Maps a single input value onto a named field of a pipeline row, for use by database and file output steps. The value can come from a numeric column index, a spreadsheet-style column letter, a named attribute on the pipeline, or a fixed constant, and can optionally be transformed by an MVEL expression before it is used. XML pipeline definitions configure one Column per field they read or write, as a "column" element; Java code can also build them programmatically using the fluent field/expr/colNum/constVal methods.

Group: Pipelines


Properties

PropertyReturnsDescription
attributeStringName of the pipeline attribute to read the raw value from, used instead of a column index or name.
columnIntegerZero-indexed number of the source column to read the raw value from, or null if this column is instead sourced by name, attribute, or constant.
columnNameStringSpreadsheet-style column letter (e.g. "A", "AB") to read the raw value from, used instead of a numeric column index.
exprStringMVEL expression evaluated against the raw value before it is used, giving access to the "value", "formatter", "row", "columns" and "pipeline" variables.
fieldStringName of the field on the pipeline row that this column's value is bound to.
valueObjectFixed constant value to use for this column, set when the column is not sourced from an index, name or attribute.
valueStringStringFixed constant string value to use for this column, an alternative to the value field for XML-configured columns.

Methods

field(String fieldNAme) · expr(String expr) · colNum(Integer column) · constVal(Object value) · getColumn() · getField() · getAttribute() · getExpr() · getValue() · getColumnName() · getValueString()

field(String fieldNAme)

Returns: Column

Sets the target field name that this column's value will be bound to, and returns this instance for chaining.

ParameterDescription
fieldNAmethe name of the field to bind this column's value to

expr(String expr)

Returns: Column

Sets the MVEL expression used to transform the raw value before it is used, and returns this instance for chaining.

ParameterDescription
exprthe MVEL expression to evaluate against the raw value

colNum(Integer column)

Returns: Column

Sets the zero-indexed source column number to read the raw value from, and returns this instance for chaining.

ParameterDescription
columnthe zero-indexed column number to read from

constVal(Object value)

Returns: Column

Sets a fixed constant value to use instead of reading from a column or attribute, and returns this instance for chaining.

ParameterDescription
valuethe constant value to use

getColumn()

Returns: Integer

Zero-indexed number of the source column to read the raw value from, or null if this column is instead sourced by name, attribute, or constant.

getField()

Returns: String

Name of the field on the pipeline row that this column's value is bound to.

getAttribute()

Returns: String

Name of the pipeline attribute to read the raw value from, used instead of a column index or name.

getExpr()

Returns: String

MVEL expression evaluated against the raw value before it is used, giving access to the "value", "formatter", "row", "columns" and "pipeline" variables.

getValue()

Returns: Object

Fixed constant value to use for this column, set when the column is not sourced from an index, name or attribute.

getColumnName()

Returns: String

Spreadsheet-style column letter (e.g. "A", "AB") to read the raw value from, used instead of a numeric column index.

getValueString()

Returns: String

Fixed constant string value to use for this column, an alternative to the value field for XML-configured columns.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.