Versions Compared

Key

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

...

Exports time series data to files in CSV format with one header line containing column headers. The import export type is generalCSV.

This feature has been implemented in the release 2014.02 (not working with older releases)

...

For more information of the table layout configuration see Table Layout

Details of the import format

If the first line contains a comma, the decimal separator is taken to be a period (.), otherwise it is supposed to be a semicolon (;) and the decimal separator is taken to be a comma. This way locale-specific CSV files are supported.

...

 

Defining column separator and decimal separator

Since 2016.01 it is possible to choose from multiple column separators: comma ","  or semi-colon ";" or pipe "|" or tab "	" or space " "

When specifying a column separator it is compulsory to also specify the decimal separator as comma ","  or point "."

 

Code Block
languagexml
titleExample configuration for usage of colum separator and decimal separator
		<general>
			<exportType>generalCsv</exportType>
			<folder>../junit_test_output/nl/wldelft/fews/system/plugin/dataExport/TimeSeriesExportTest/exportGeneralCsvColumnSeparator/export</folder>
			<exportFileName>
				<name>ExportGeneralCsvColumnSeparator.csv</name>
			</exportFileName>
			<table>
				<dateTimeColumn name="DateTime" pattern="yyyy-MM-dd HH:mm"/>
				<locationColumn name="Location"/>
				<parameterColumn name="Parameter"/>
				<qualifierColumn name="QualifierId" prefix="CAL_"/>
				<qualifierColumn name="QualifierId" prefix="IlC_"/>
				<attributeColumn name="QualifierName" id="qualifierName"/>
				<attributeColumn name="Type" id="type"/>
				<attributeColumn name="Groep" id="groep"/>
				<attributeColumn name="filter" id="filter"/>
				<propertyColumn name="StringProperty" key="stringKey"/>
				<propertyColumn name="SecondStringProperty" key="secondStringKey"/>
				<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"/>
				<unitColumn name="Unit"/>
			</table>
			<idMapId>GeneralCsv</idMapId>
			<exportMissingValueString>-9999.0</exportMissingValueString>
			<columnSeparator>|</columnSeparator>
			<decimalSeparator>.</decimalSeparator>
		</general>

This enables importing for example the format below:

Code Block
none
none
DateTime|Location|Parameter|QualifierId|QualifierId|QualifierName|Type|Groep|filter|StringProperty|SecondStringProperty|A|B|C|D|E|Value|Unit
2003-02-22 00:00|chj|mxgn|CALLPRAU|ILCOCIMC|Callicorixa praeusta|Macrofauna|INHET|1|StringValue|SecondStringValue|OK|OK|OK|OK|OK|0.0|m
2003-02-23 00:00|chj|mxgn|CALLPRAU|ILCOCIMC|Callicorixa praeusta|Macrofauna|INHET|1|StringValue|SecondStringValue|OK|OK|OK|OK|OK|1.0|m
2003-02-24 00:00|chj|mxgn|CALLPRAU|ILCOCIMC|Callicorixa praeusta|Macrofauna|INHET|1|StringValue|SecondStringValue|OK|OK|OK|OK|OK|2.0|m
2003-02-25 00:00|chj|mxgn|CALLPRAU|ILCOCIMC|Callicorixa praeusta|Macrofauna|INHET|1|StringValue|SecondStringValue|OK|OK|OK|OK|OK|3.0|m
2003-02-26 00:00|chj|mxgn|CALLPRAU|ILCOCIMC|Callicorixa praeusta|Macrofauna|INHET|1|StringValue|SecondStringValue|OK|OK|OK|OK|OK|4.0|m
2003-02-27 00:00|chj|mxgn|CALLPRAU|ILCOCIMC|Callicorixa praeusta|Macrofauna|INHET|1|StringValue|SecondStringValue|OK|OK|OK|OK|OK|5.0|m
2003-02-28 00:00|chj|mxgn|CALLPRAU|ILCOCIMC|Callicorixa praeusta|Macrofauna|INHET|1|StringValue|SecondStringValue|OK|OK|OK|OK|OK|6.0|m
2003-03-01 00:00|chj|mxgn|CALLPRAU|ILCOCIMC|Callicorixa praeusta|Macrofauna|INHET|1|StringValue|SecondStringValue|OK|OK|OK|OK|OK|7.0|m

 

Samples Import