Versions Compared

Key

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

...

In the regular timeseries exports, the export of flagSourceColumns is supported for the PI-XML format and the GeneralCSV format. In PI-XML, the flagSource columns will always be exported. When exporting using the generalCsv export format, inclusion of flagSourceColumns can be defined in the configuration with the use of Table Layout.

Import of flagSourceColumns

Below is given an example on how to configure a generalCSV import with flagSource columns.

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

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.

Copying of flagSource columns to other timeseries

...