Linking the components - 6.5

Talend Job Script Reference Guide

EnrichVersion
6.5
EnrichProdName
Talend Big Data
Talend Big Data Platform
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Real-Time Big Data Platform
EnrichPlatform
Talend CommandLine
Talend Studio
task
Design and Development > Designing Jobs

Follow the steps below to add and define the connections that link the components and subjobs in the Job.

Procedure

  1. Enter the following script code to define a Main row connection between the tFileInputDelimited component and the tReplicate component.
    // add connections
    addConnection {
    	TYPE: "FLOW",
    	NAME: "row1",
    	LINESTYLE: 0,
    	SOURCE: "tFileInputDelimited_1",
    	TARGET: "tReplicate_1"
    }
  2. Enter the following script code to define a Main row connection between the tReplicate component and the first tLogRow component.
    addConnection {
    	TYPE: "FLOW",
    	NAME: "row2",
    	LINESTYLE: 0,
    	SOURCE: "tReplicate_1",
    	TARGET: "tLogRow_1"
    }
  3. Enter the following script code to define a Main row connection between the tReplicate component and the tFilterColumns component.
    addConnection {
    	TYPE: "FLOW",
    	NAME: "row3",
    	LINESTYLE: 0,
    	SOURCE: "tReplicate_1",
    	TARGET: "tFilterColumns_1"
    }
  4. Enter the following script code to define a Main row connection between the tFilterColumns component and the tFilterRow component.
    addConnection {
    	TYPE: "FLOW",
    	NAME: "row4",
    	LINESTYLE: 0,
    	SOURCE: "tFilterColumns_1",
    	TARGET: "tFilterRow_1"
    }
  5. Enter the following script code to define a Filter row connection between the tFilterRow component and the second tLogRow component.
    addConnection {
    	TYPE: "FILTER",
    	NAME: "row5",
    	LINESTYLE: 0,
    	SOURCE: "tFilterRow_1",
    	TARGET: "tLogRow_2"
    }
  6. Enter the following script code to define a Reject row connection between the tFilterRow component and the third tLogRow component.
    addConnection {
    	TYPE: "REJECT",
    	NAME: "row6",
    	LINESTYLE: 0,
    	SOURCE: "tFilterRow_1",
    	TARGET: "tLogRow_3"
    }
  7. Enter the following script code to define an OnSubjobOk trigger connection between the tFileInputDelimited component and the tJava component to link the two subjobs so that the successful execution of the first subjob triggers the execution of the second one.
    addConnection {
    	TYPE: "SUBJOB_OK",
    	NAME: "OnSubjobOk",
    	LINESTYLE: 1,
    	SOURCE: "tFileInputDelimited_1",
    	TARGET: "tJava_1"
    }