Featured Post

Applying Email Validation to a JavaFX TextField Using Binding

This example uses the same controller as in a previous post but adds a use case to support email validation.  A Commons Validator object is ...

Saturday, April 9, 2011

Component Field COLUMN_LIST in Talend Open Studio

If your Talend Open Studio custom component needs to select from a list of columns in an input or output schema, use the COLUMN_LIST field type.  By default, this will display fields from the FLOW schema.  To select columns from other schemas, define a different CONNECTOR and use the CONTEXT attribute.

The COLUMN_LIST field type is a PARAMETER that enables the user to select from a list of columns of a schema.  For example, this screenshot shows two COLUMN_LIST fields "Reason code column" and "Reason message column".  Both of these COLUMN_LISTS are based on a schema associated with the REJECT connector.

FIELD=COLUMN_LIST in Component View
XML Configuration

A COLUMN_LIST parameter is created using the FIELD, NAME, and NUM_ROWS attributes.  "FIELD" is set to COLUMN_LIST.  "NAME" is a unique name used in the JET code.  "NUM_ROWS" is the display line of the COLUMN_LIST.  This particular example also uses a GROUP attribute to relate the two COLUMN_LIST parameters under "Reject fields".

XML for a COLUMN_LIST PARAMETER
 Linking Schemas

 The above configuration of the COLUMN_LIST parameter contains a CONTEXT attribute.  This is the name of a input or output schema associated with a CONNECTOR.  For example, there is a CONNECTOR named "REJECT".  This connector is configured with a parameter named "SCHEMA_REJECT" which also refers to the REJECT context.

XML Setting up REJECT CONNECTOR and CONTEXT
 The column list value is retrieved the ElementParameterParser.getValue() call.

Properties Note
 
The column list will accept .NAME properties.  In 4.1.0, COLUMN_LIST is a little different in that a presentable label is displayed if none is provided.  "Column list" is displayed, rather than "!!!COLUMN_LIST.NAME!!" as in other cases.

COLUMN_LIST will let the user select a schema column in Component View.  This selected column is available in the JET or Java code associated with the component.  Off-the-shelf, COLUMN_LIST displays FLOW columns.  With additional CONNECTORS, COLUMN_LIST can be pointed to other schemas.

No comments:

Post a Comment