CSVDataSink
The CSVDataSink
puts each record into a CSV file. If the file already exists it will be overwritten. It also does not support the create, update and delete methods but just appends a line to the CSV file for each object it receives.
Configuration
Name | Type, usage constraints, defaults | Description |
---|---|---|
filename | required: paraVal default: none type: path to readable CSV file | Name of the CSV file where the target records should be written to. If the file already exists, it will be overwritten. |
attributes | optional: paraVal default: none type: list of strings | Defines the column names of the CSV file. If defined, they will be written as header line to the export file. |
separator | optional: paraVal default: , type: char | Separator character used as delimiter for separating entries. |
quotechar | optional: paraVal default: " " type: char | Quoting character used for quoted elements. |
encoding | optional: paraVal default: default encoding type: string | The name of the character set that should be used to encode the file. The available values depend on the version and vendor of the JVM. Examples: UTF-8, ISO-8859-1, UTF-16LE |
Example
<dataSink type="CSVDataSink">
<dp:paraVal name="filename" value="etc/csv.out"/>
<dp:paraList name="attributes">
<value>firstname</value>
<value>lastname</value>
<value>email</value>
</dp:paraList>
</dataSink>