Defining the child Job to be called and the connection between the components - 6.5

Talend Job Script Reference Guide

author
Talend Documentation Team
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
task
Design and Development > Designing Jobs
EnrichPlatform
Talend CommandLine
Talend Studio

Use the procedure below to add and configure a tRunJob component that will be used to call the child Job.

Procedure

  1. Next the tLoop component, add a new addComponent {} function and its sub-function setComponentDefinition {} to add a tRunJob component.
    addComponent {
    	setComponentDefinition {
    		TYPE: "tRunJob",
    		NAME: "tRunJob_1",
    		POSITION: 448, 192
    	}
    
    }
  2. Next to the setComponentDefinition {} function, enter the setSettings {} function to specify the child Job to be called.
    	setSettings {
    		PROCESS : "HelloWorld",
    		PROCESS:PROCESS_TYPE_CONTEXT : "Default",
    		PROCESS:PROCESS_TYPE_PROCESS : "_SKWgMMqDEeeZVPkXOYGoLg"
    	}
  3. Next to the tRunJob Job script definitions, enter the following script code to define an Iterate row connection between the tLoop component and the tRunJob component.
    addConnection {
    	TYPE: "ITERATE",
    	NAME: "Iterate",
    	LINESTYLE: 7,
    	METANAME: "tLoop_1",
    	SOURCE: "tLoop_1",
    	TARGET: "tRunJob_1"
    }