Creating the child Job to pass a value to the parent Job - 7.3

Buffer

Version
7.3
Language
English
Product
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
Module
Talend Studio
Content
Data Governance > Third-party systems > Buffer components
Data Quality and Preparation > Third-party systems > Buffer components
Design and Development > Third-party systems > Buffer components
Last publication date
2024-02-21

The child Job will read data from a text file, populate the total number of rows and pass the rows to the parent Job.

The input file, named in.txt, is as follows:

id;name
			1;Shong
			2;Elise
			3;Sabrina

This Job will use the following components:

  • a tFileInputDelimited component to read data from a text file and a tLogRow component to print it on the console,
  • a tFixedFlowInput component to get the total number of rows read by the tFileInputDelimited component and a tBufferOutput component to buffer the value.

Procedure

  1. Create a Job and name it childJob.
  2. Add a tFileInputDelimited component and a tLogRow component on the workspace and link them with a Row > Main connection.
  3. Add a tFixedFlowInput component and a tBufferOutput component on the workspace and link them with a Row > Main connection.
  4. Link the first subJob to the second one with a Trigger > On Subjob Ok connection.
  5. Click the tFileInputDelimited component to open its Basic settings view and fill the File name/Stream with the in.txt file path and the Header field with 1.
  6. Click the [...] button next to Edit schema to open the schema dialog box and define the schema by adding two columns, id of Integer type and name of String type.
  7. Double-click the tFixedFlowInput component to create a column named nb_line of Integer type.
  8. In the Mode area, select Use Single Table and fill the Value cell with ((Integer)globalMap.get("tFileInputDelimited_1_NB_LINE")).