...
Name | Default Value | Description |
---|---|---|
delimiter | ',' | the The default character delimiter for delimited files |
textQualifier | '"' | the The text qualifier delimited files |
ignoreFirstRecord | true | whether Whether the first line is ignored for delimited files (for the column headers) |
splitRows | true | As of Camel 1.5 the component can either process each row one by one or the entire content at once. |
...
Header | Description |
---|---|
camelFlatpackCounter | The current row index. For |
Message Body
The component delivers the data in the IN message as a org.apache.camel.component.flatpack.DataSetList
object that has have converters for java.util.Map
or java.util.List
.
Usually you want the Map if you process one row at a time (splitRows=true). The And the List is useful for the entire content (splitRows=false), where each element in the list is a Map.
Each Map contain the key for the column name and the its corresponding value.
For example to get the firstname from the sample below:
...
However you can also always get it as a List (even for splitRows=true). The sample same example:
Code Block | ||||
---|---|---|---|---|
| ||||
List data = exchange.getIn().getBody(List.class); Map row = (Map)data.get(0); String firstName = row.get("FIRSTNAME"); |
...