CTL Templates for Joiners
This transformation template is used in every Joiner and also in Map and DataIntersection.
Here is an example of how the Source tab for defining the transformation in CTL looks.
CTL Template Functions | |
---|---|
boolean init() |
|
Required |
No |
Description |
Initialize the component, setup the environment, global variables. |
Invocation |
Called before processing the first record. |
Returns |
|
integer transform() |
|
Required |
yes |
Input Parameters |
none |
Returns |
Integer numbers. For detailed information, see Return Values of Transformations. |
Invocation |
Called repeatedly for each set of joined or intersected input records (Joiners and DataIntersection) and for each input record (Map). |
Description |
Allows you to map input fields to the output fields using a script.
If any part of the If |
Example |
|
integer transformOnError(string errorMessage, string stackTrace, integer idx) |
|
Required |
no |
Input Parameters |
|
|
|
Returns |
Integer numbers. For detailed information, see Return Values of Transformations. |
Invocation |
Called if |
Description |
It creates output records.
If any part of the If |
Example |
|
string getMessage() |
|
Required |
No |
Description |
Prints an error message specified and invoked by user. |
Invocation |
Called in any time specified by the user (called only when |
Returns |
|
void preExecute() |
|
Required |
No |
Input parameters |
None |
Returns |
|
Description |
May be used to allocate and initialize resources required by the transformation.
All resources allocated within this function should be released by the |
Invocation |
Called during each graph run before the transform is executed. |
void postExecute() |
|
Required |
No |
Input parameters |
None |
Returns |
|
Description |
Should be used to free up any resources allocated within the |
Invocation |
Called during each graph run after the entire transform was executed. |
|
Remember that if you do not hold these rules, NPE will be thrown. |