You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Table Layout.

Currently the GeneralCsv and Database import require a table layout description configured by the user. Non-standard imports (plug-ins) can also required a table layout. See the third party documentation of the specific import.

There are different types of table structures supported.

  • Every parameter has it’s own column
  • Every location has it’s own column.
  • Every qualifier has it’s own column.
  • Every parameter/location/qualifier combination has it’s own column
  • Single value column and a parameter, location, qualifier and unit column to describe the value in the value column.
  • All values for a single month a listed in a single row, for every day of month there is separate column.
  • All values for a single day listed in a single row, for every time of day there is separate column.
  • Variants and combinations of the above are sometimes allowed

The column names are required for the GeneralCsv and Database import. The table name is ignored by the GeneralCsv import. Non-standard imports can ignore the column name. They expect that the order of the columns in the configuration is the same as in the file. For columns that should be ignored add a skippedColumn element in this case. When the column name is used by the import the order of the columns in the configuration has no meaning and there is no need to add a skippedColumn for the unwanted columns. For the Database import you can specify multiple tables. This has the advantage that you can reuse a database connection to import multiple tables.

A value column can have a fixed location id or every row can have a different location id when there is a location column. The same is true for the parameter id and qualifiers.

A value column can have a fixed unit or every row can have a different unit when there is a unit column.

The date/time is available in a combined data/time column or in two separated date and time columns. It is required to configure the data and time patterns when date/time is stored in a text column instead of timestamp column. The value columns can also contain a day of month or hour of day attribute. This attribute overrules the day or time provided by the date/time column. These attributes are used when all data for whole month or day is combined in a single row.

When the imported table contains grid files you have to specify the parser to parse these grids. Any grid format supported by the import module can be used.

Only one flag and comment column is allowed also when you have multiple value columns. All values in single row share the same flag and comment.

data time pattern
The date time patterns are handled by the JDK class SimpleDateFormat

Letter

Date or Time

Component

Presentation Examples

G

Era designator

Text

AD

y

Year

Year

1996; 96

Y

Week year

Year

2009; 09

M

Month in year

Month

July; Jul; 07

w

Week in year

Number

27

W

Week in month

Number

2

D

Day in year

Number

189

d

Day in month

Number

10

F

Day of week in month

Number

2

E

Day name in week

Text

Tuesday; Tue

u

Day number of week (1 = Monday, ..., 7 = Sunday)

Number

1

a

Am/pm marker

Text

PM

H

Hour in day (0-23)

Number

0

k

Hour in day (1-24)

Number

24

K

Hour in am/pm (0-11)

Number

0

h

Hour in am/pm (1-12)

Number

12

m

Minute in hour

Number

30

s

Second in minute

Number

55

S

Millisecond

Number

978

z

Time zone

General time zone

Pacific Standard Time; PST; GMT-08:00

Z

Time zone

RFC 822 time zone

-0800

X

Time zone

ISO 8601 time zone

-08; -0800; -08:00

Schema

examples

<table>
   <dateTimeColumn name="Time" pattern="dd-MM-yyyy HH:mm"/>
   <valueColumn unit="m" locationId="Bosscheveld" parameterId="H.meting" name="Waterstand"/>
   <valueColumn unit="min" locationId="Bosscheveld" parameterId="DT.meting" name="Pomp-1 Born"/>
</table>
<table name="rst_f">
    <dateTimeColumn name="RST_DATE"/>
    <locationColumn name="RST_CODE"/>
    <valueColumn name="RST_RAIN" unit="mm" parameterId="P.obs"/>
</table>

date pattern is not required because the date column is a SQL time stamp column

<table name="dam_f">
   <dateTimeColumn name="DAM_DATE"/>
   <valueColumn name="DAM_WLEV" locationId="Feitsui" unit="m" parameterId="H.reservoir.obs"/>
   <valueColumn name="DAM_INFLOW" locationId="Feitsui" unit="m3/s" parameterId="Q.in"/>
   <valueColumn name="DAM_OUFLOW" locationId="Feitsui" unit="m3/s" parameterId="Q.out"/>
</table>
<table name="gate_tp">
   <dateTimeColumn name="GATE_DATE"/>
   <locationColumn name="GATE_CODE"/>
   <valueColumn name="IN_LEVEL" unit="m" parameterId="H.obs.upstream"/>
   <valueColumn name="OUT_LEVEL" unit="m" parameterId="H.obs.downstream"/>
</table>
<table name="lst">
   <dateTimeColumn name="jdate"/>
   <valueColumn name="lst" unit="K" locationId="Modis_Grid" parameterId="T.landsurface" parser="AsciiGrid"/>
</table>
<table name="StageList">
  <dateTimeColumn name="InDate"/>
  <valueColumn name="Shemen" locationId="HS03" unit="m" parameterId="H.obs"/>
  <valueColumn name="Clouds" locationId="HS02" unit="m" parameterId="H.obs"/>
  <valueColumn name="High" locationId="1140H043" unit="m" parameterId="H.obs"/>
  <valueColumn name="Angle" locationId="1140H002" unit="m" parameterId="H.obs"/>
  <valueColumn name="Jade" locationId="HS01" unit="m" parameterId="H.obs"/>
  <valueColumn name="Show" locationId="1140H041" unit="m" parameterId="H.obs"/>
  <valueColumn name="Kide" locationId="HS04" unit="m" parameterId="H.obs"/>
</table>
  • No labels