Creating a parent Job to pass a value to a child Job - 7.0

Orchestration (Integration)

EnrichVersion
7.0
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 Open Studio for Big Data
Talend Open Studio for Data Integration
Talend Open Studio for ESB
Talend Open Studio for MDM
Talend Real-Time Big Data Platform
EnrichPlatform
Talend Studio
task
Data Governance > Third-party systems > Orchestration components (Integration)
Data Quality and Preparation > Third-party systems > Orchestration components (Integration)
Design and Development > Third-party systems > Orchestration components (Integration)

Before you begin

You have created a text file, in this example in.text.
id;name;scope
1;Shong;98
2;Ross;90
3;Tom;55
4;Patrick;99
5;Pedro;90

Procedure

  1. Create a Standard Job called ParentJob and configure it as follows.
  2. Double-click the tFileInputDelimited to open its Basic settings view and then configure its parameters.
    • Click the [...] button next to the File Name/Stream field and browse to the source file, in this example in.txt.
    • Set Header to 1.
    • Click the Edit schema button and add three columns to the schema, id as Integer, name as String and scope as Integer.
  3. In the Basic settings of the tFlowToIterate component, make sure that the Use the default (key,value) in global variables. box is checked.
  4. Open the Basic settings view of the tRunJob component to configure its parameters.
  5. In the Job field, select the child Job, in this example ChildJob.
  6. In the Context Param field, click the [+] button to add the two parameters defined in the Context tab of the child Job, in this example name and scope.
  7. Define the value for each parameter, (String)globalMap.get("row1.name") for name and (Integer)globalMap.get("row1.scope") for scope.
  8. Press Ctrl+S to save your changes.
  9. Press F6 to execute the parent Job.

Results

The following results print to the console.