Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Currently the GeneralCsv and Database import require a table layout description configured by the user. Non-standard imports (plug-ins) can also required require 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 its own column
  • Every location has it’s its own column.
  • Every qualifier has it’s its own column.
  • Every parameter/location/qualifier combination has it’s its 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

...

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

Any characters within the date-time stamp can be accommodated by including that character in the pattern, surrounded by single quotes, e.g. <dateTimeColumn name="date_obs" pattern="yyyy-MM-dd'T'HH:mm:ss'Z'"/> allows for reading a date-time column that is formatted as: 2022-03-29T09:30:00Z.


Schema
Image AddedSchema
Image Removed

examples

Code Block
xml
xml
<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>

...

Code Block
xml
xml
<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>


Anchor
GeneralCSV_InteractiveExport
GeneralCSV_InteractiveExport
An example on how to add flagSourceColumns is shown below. This is possible since FEWS version 2015.02.

Code Block
<table>
	<dateTimeColumn pattern="dd-MM-yy HH:mm"/>
	<locationColumn name="Location"/>
	<parameterColumn name="Parameter"/>
	<flagSourceColumn name="A" id="A"/>
	<flagSourceColumn name="B" id="B"/>
	<flagSourceColumn name="C" id="C"/>
	<flagSourceColumn name="D" id="D"/>
	<flagSourceColumn name="E" id="E"/>
	<valueColumn name="Value"/>
</table>

Sample, properties and qualifiers example

Since 2014.02 it is possible to use sampleIdColumn (normal ComplexColumnType with just name attribute), propertyColumn (with mandatory key attribute) and attribute column (with mandatory id attribute) which can only be used for export since attributes can not be imported but only configured. qualifierColumn is extended with the optional prefix attribute which will be added in front of the external qualifier id, this can be useful for id mapping. 

Below configuration is shown which can import sample data, with properties and multiple qualifiers. In case sample data is imported the properties will be automatically used for the sample instead of the time step.

...

The qualifier columns use the prefix again, to recognise from the external id which qualifier should be put in the column. When the qualifier is found, the prefix will be stripped from the external id.

...