pfx-csv:streamingUnmarshal
Creates CSVParser
from the input and stores it in the message body.
If you want to reuse CSVParser
for multiple reads, use the URI option useReusableParser=true
(see below).
Properties
Option | Type | Default | Description |
---|---|---|---|
| string | Â | Sets the comment marker of the reference format. |
| string |  | Sets the quote mode. |
| string | Â | Â |
| Boolean |  | Determines whether empty lines should be ignored. |
| string |  | Sets the escape character to use. |
| Boolean | Â | Sets the trailing delimiter. |
| Boolean |  | Determines whether to ignore surrounding spaces. |
| Boolean |  | Determines whether to skip the header record in the output. |
| Boolean | Â | Sets the trim. |
| string |  | Sets the delimiter to use. The default value is a comma. |
| string |  | Sets the header comments. |
| string | Â | Sets the null string. |
| string | Â | Used to configure the CSV headers. |
| Boolean | Â | Determines whether the header case is ignored. |
| Boolean | Â | Determines whether to allow missing column names. |
| string | Â | Sets a quote character. |
| string | Â | Sets the record separator (= new line)Â which is by default set according to the OS default value. |
| Boolean | false | Determines whether to use |
Examples
You can use streamingUnmarshal
to load data into Pricefx. The pfx-api:loaddataFile
component uses CSVParser
internally to parse and load data, without the need to use <split>
inside the Camel route.
<loadMapper id="productMapper" includeUnmappedProperties="false">
<body in="sku"/>
<body in="name" out="label/>
</loadMapper>
<routes xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="direct:create"/>
<to uri="pfx-io:streamCompressedFile"/>
<to uri="pfx-csv:streamingUnmarshal?skipHeaderRecord=true"/>
<to uri="pfx-api:loaddataFile?batchSize=500000&mapper=productMapper&objectType=P"/>
<log message="Done"/>
</route>
</routes>
IntegrationManager version 5.8.0