...
You can append query options to the URI in the following format, ?option=value&option=value&...
URI Options
Div | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||
| |||||||||||||||||||||
Wiki Markup | |||||||||||||||||||||
{div:class=confluenceTableSmall}
|| Name || Default Value || Description ||
| {{delimiter}} | {{,}} | The default character delimiter for delimited files.|
| {{textQualifier}} | {{"}} | The text qualifier for delimited files.|
| {{ignoreFirstRecord}} | {{true}} | Whether the first line is ignored for delimited files (for the column headers).|
| {{splitRows}} | {{true}} | The component can either process each row one by one or the entire content at once. |
| {{allowShortLines}} | {{false}} | *Camel 2.9.7 and 2.10.5 onwards:* Allows for lines to be shorter than expected and ignores the extra characters. |
| {{ignoreExtraColumns}} | {{false}} | *Camel 2.9.7 and 2.10.5 onwards:* Allows for lines to be longer than expected and ignores the extra characters. |
{div} |
Examples
flatpack:fixed:foo.pzmap.xml
creates a fixed-width endpoint using thefoo.pzmap.xml
file configuration.flatpack:delim:bar.pzmap.xml
creates a delimited endpoint using thebar.pzmap.xml
file configuration.flatpack:foo
creates a delimited endpoint calledfoo
with no file configuration.
...
Camel will store the following headers on the IN message:
Div | ||||
---|---|---|---|---|
| ||||
| ||||
Wiki Markup | ||||
{div:class=confluenceTableSmall}
|| Header || Description ||
| {{camelFlatpackCounter}} | The current row index. For {{splitRows=false}} the counter is the total number of rows. |
{div} |
Message Body
The component delivers the data in the IN message as a org.apache.camel.component.flatpack.DataSetList
object that has converters for java.util.Map
or java.util.List
.
Usually you want the Map
if you process one row at a time (splitRows=true
). Use List
for the entire content (splitRows=false
), where each element in the list is a Map
.
Each Map
contains the key for the column name and its corresponding value.
...