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
| Property | Returns | Description |
|---|---|---|
| attribute | String | Name of the pipeline attribute to read the raw value from, used instead of a column index or name. |
| column | 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. |
| columnName | String | Spreadsheet-style column letter (e.g. "A", "AB") to read the raw value from, used instead of a numeric column index. |
| expr | String | MVEL expression evaluated against the raw value before it is used, giving access to the "value", "formatter", "row", "columns" and "pipeline" variables. |
| field | String | Name of the field on the pipeline row that this column's value is bound to. |
| value | Object | Fixed constant value to use for this column, set when the column is not sourced from an index, name or attribute. |
| valueString | String | Fixed 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.
| Parameter | Description |
|---|---|
fieldNAme | the 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.
| Parameter | Description |
|---|---|
expr | the 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.
| Parameter | Description |
|---|---|
column | the 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.
| Parameter | Description |
|---|---|
value | the 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.