Combine
Short Description
Combine takes one record from each input port, combines them according to a specified transformation and sends the resulting records to one or more ports.
COMPONENT | SAME INPUT METADATA | SORTED INPUTS | INPUTS | OUTPUTS | TRANSFORMATION | TRANSF. REQ. | JAVA | CTL | AUTO-PROPAGATED METADATA |
---|---|---|---|---|---|---|---|---|---|
Combine | x | x | 1-n | 1-n | ✓ | ✓ | ✓ | ✓ | x |
Ports
PORT TYPE | NUMBER | REQUIRED | DESCRIPTION | METADATA |
---|---|---|---|---|
Input | 0-n | ✓ | Input records to be combined. | Any |
Output | 0-n | ✓ | An output record which is the result of combination. | Any |
Metadata
Combine does not propagate metadata.
Combine has no metadata templates.
Combine Attributes
ATTRIBUTE | REQ. | DESCRIPTION | POSSIBLE VALUES |
---|---|---|---|
BASIC | |||
Transform | [1] | The definition of how input records should be combined into output record. Written in the graph source either in CTL or in Java. | |
Transform URL | [1] | The name of an external file, including the path, containing the definition of the way how records should be combined. Written in CTL or in Java. | |
Transform class | [1] | The name of an external class defining the way how records should be combined. | |
Transform source charset | Encoding of external file defining the transformation. The default encoding depends on DEFAULT_SOURCE_CODE_CHARSET in defaultProperties. | E.g. UTF-8 | |
Allow incomplete tuples | Whether each input port has to contribute a record for each output record. | true (default) | false |
[1] One of these must be specified. Any of these transformation attributes uses a CTL template for Map or implements a RecordTransform
interface.
For detailed information about transformations, see also Defining Transformations.
Details
In each step, the Combine component takes one record from all input ports, creates a single output record, and fills fields of this output record with data from input record (or other data) according to the specified transformation.
The simplest way to define the combination transformation is using the Transform Editor available at the Transform component attribute. There you will see metadata for each input port on the left side and metadata for the single output port on the right side. Simply drag and drop the fields from the left to the fields on the right to create the desired combination transformation.
In default setting, the component assumes that the same number of records will arrive on each input port, and in case that some input edge becomes empty while others still contain some records, the component fails. You can avoid this failures by setting the Allow incomplete tuples attribute to true.
Best Practices
If the transformation is specified in an external file (with Transform URL), we recommend users to explicitly specify Transform source charset.
See also
Updated about 1 year ago