Skip to main content
Version: 7.2402.x.x RR

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

NameType, usage constraints, defaultsDescription
filenamerequired: 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.
attributesoptional: 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.
separatoroptional: paraVal
default: ,
type: char
Separator character used as delimiter for separating entries.
quotecharoptional: paraVal
default: " "
type: char
Quoting character used for quoted elements.
encodingoptional: 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>