Type to start searching...

CSVMapping

Maps message parts to columns in a CSV file.

Description
Requires a "rows" composite message part with child value parts representing columns in the CSV record.
Properties
comment : string

Lines starting with one of these characters should be ignored by the parser.

delimiter : string

The character to use as the CSV field delimiter. (Default value: ',') Special characters supported through backslash escaping.

escape : string

A character used to prefix special characters in the data; "none" to disable escaping altogether. (Default value: '\')

'Quote' and 'escape' have a special relationship as follows: - If 'quote' is set and 'escape' is "none" the 'quote' character will be escaped by 'doubling-up' the character. (e.g. 'she said "hi"' will be escaped as "she said ""hi""") - If 'quote' is set and 'escape' is set the 'quote' character will be escaped by the escape character. (e.g. 'she said "hi"' will be escaped as "she said \"hi\"") - If 'quote' is "none" and 'escape' is set the 'delimiter' character can be escaped, but newlines cannot be escaped and may confuse parsing (not recommended). - If 'quote' and 'escape' are both set to "none" then it is possible to produce ambiguous output.
field : string

CSV field name to which this value should be mapped.

'Field' is only needed if 'header' is set to true. If 'field' is not specified, then the message part value name will be used.
format : string

Format string to be used when formatting the value.

This property only applies to value message parts and is not to be confused with the format property of the root message part. It is used to format primitive values to a specific external representation.

For timestamp formats see the SimpleDateFormat Java class.

For decimal, double, float, integer, and long formats see the DecimalFormat Java class.

For boolean formats we use our own formatter that supports the following values. "Yes,True,#t;No,False,#f"

Note:


* the timezone from the current invocation context is used.
* Decimal formatting symbols from the current locale are used
  (e.g. period or space for thousands separator, etc.)
* The format pattern is presumed to be a string id and is looked up in
  the strings for the current invocation context. If not found, a second lookup
  is attempted, prefixing the format pattern with "ids.format.". If that
  also fails, then the format pattern is assumed to contain a format pattern
  that can be passed directly to the format instance.

Example


"h:mm a" => "12:08 PM"
"EEE, d MMM yyyy HH:mm:ss Z" => "Wed, 4 Jul 2001 12:08:56 -0700"
"#,##0.0#;(#,##0.0#)" => "1,000.0"

header : boolean

True to output a header row of field names.

line

The end-of-line sequence to output after every record when formatting.

Valid values based on“string”.
\n
\r
\r\n
ordinal : positiveInt

The 1-based index of the field in the CSV file to which this value should map.

'Ordinal' will be used to order the fields on output. Default ordering is determined by the message structure (i.e. the order of the message part values). 'Ordinal' allows you to re-order the output message. 'Ordinal' also determines which column to map to the message part value on input when 'header' is set to false. If 'header' is set to true, 'ordinal' is ignored on input (but not on output as stated above).
Valid values based on“int”.
1 (minInclusive)
pageSize : nonNegativeInt

Set this to swap data to disk if the collection page size in items is exceeded. Zero to disable paging.

Valid values based on“int”.
0 (minInclusive)
quote : string

A character used to quote fields which contain special characters; "none" to disable quoting altogether. (Default value: '"')

'Quote' and 'escape' have a special relationship as follows: - If 'quote' is set and 'escape' is "none" the 'quote' character will be escaped by 'doubling-up' the character. (e.g. 'she said "hi"' will be escaped as "she said ""hi""") - If 'quote' is set and 'escape' is set the 'quote' character will be escaped by the escape character. (e.g. 'she said "hi"' will be escaped as "she said \"hi\"") - If 'quote' is "none" and 'escape' is set the 'delimiter' character can be escaped, but newlines cannot be escaped and may confuse parsing (not recommended). - If 'quote' and 'escape' are both set to "none" then it is possible to produce ambiguous output.
quoted : boolean

Force formatter to quote this field. Overrides value inherited from parent. If false or unspecified, then only quote as necessary.

'Quoted' is only relevant during output. By default, we employ 'minimal quoting'. Only field values that need quoting (i.e. contain special characters) will be quoted on output. By setting 'quoted' to true on a message part value, the field will be quoted unconditionally on output regardless of the value.
Parents
  • Value - A value (or primitive) message part.
  • Message - A message (or composite) message part.
  • Message
  • Message - A message carries information from a source system to a destination system over an integration channel.