...
Below is given an example on how to configure a generalCSV import with flagSource columns.
<? xml version = "1.0" encoding = "UTF-8" ?> < timeSeriesImportRun xmlns = "http://www.wldelft.nl/fews" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation = "http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/timeSeriesImportRun.xsd" > < import > < general > < importType >generalCSV</ importType > < folder >../junit_test_output/nl/wldelft/fews/system/plugin/dataImport/TimeSeriesImportTestData/import/generalcsv</ folder > < table > < dateTimeColumn name = "DATE" pattern = "dd-MM-yy HH:mm" /> < locationColumn name = "LOC" /> < unitColumn name = "UNIT" /> < parameterColumn name = "PARAM" /> < flagSourceColumn id = "A" name = "FS_A" /> <!-- column with name fs a will be mapped to the flag source column with identifier A --> < flagSourceColumn id = "B" name = "FS_B" /> < flagSourceColumn id = "C" name = "FS_C" /> < flagSourceColumn id = "D" name = "FS_D" /> < flagSourceColumn id = "E" name = "FS_E" /> < valueColumn name = "VALUE" /> </ table > < logWarningsForUnmappableLocations >true</ logWarningsForUnmappableLocations > < logWarningsForUnmappableParameters >true</ logWarningsForUnmappableParameters > < logWarningsForUnmappableQualifiers >true</ logWarningsForUnmappableQualifiers > < maxLogWarnings >1000</ maxLogWarnings > < missingValue >-999</ missingValue > < importTimeZone > < timeZoneOffset >+01:00</ timeZoneOffset > </ importTimeZone > < dataFeedId >generalCSV</ dataFeedId > </ general > </ import > </ timeSeriesImportRun > |
The CSV file for this example could look like this:
...
Code Block | ||||
---|---|---|---|---|
| ||||
DATE,LOC,VALUE,UNIT,PARAM,FS_A |
...
,FS_B |
...
,FS_C |
...
,FS_D |
...
,FS_ |
...
E01-01-81 00:00 |
...
,H-2001 |
...
,2.3 |
...
,m |
...
,P.m |
...
,OK,OK,OK,OK,OK3110040601;Spiegelplas 4;133054;475032;MEA;WP_CAS_ZUY;OW;Van Veenhapper;SPV7030;WP_CAS_ZUY;SBP130;06-04-10 00:00;Tubificidae;2;n;MACEV2010;AANTL_MEA;gemeten
|
Note that during import, the mapping goes from 'name' to 'id'. When importing the data, the flagSourceColumnId's should be configured in the flagSourceColumns configuration file.
Samples Import
For the import of ecological data based on samples, the general csv import is used extensively because there is a lot of information per timeseries.
...
The field separator is either a comma or a semicolon. Tabs are not supported.
DATE | LOC | VALUE | UNIT | PARAM | FS_A | FS_B | FS_C | FS_D | FS_E |
---|---|---|---|---|---|---|---|---|---|
01-01-81 00:00 | H-2001 | 2.3 | m | P.m | OK | OK | OK | OK | OK |