You may need to return a value or rows from a child Job to the parent Job for further use. This article shows the best practice of how to pass a value with a tBufferOutput component from a child Job to the parent Job.
This procedure was written with:
This procedure applies to versions of Talend Open Studio for Data Integration starting from v4.2.3.
In this tutorial, you will create two Jobs: a parent Job and a child Job. 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
The demo Jobs and the text file required in this use case are also available in the Related File section of this article.
Execute the parentJob Job. The results are printed in the console:
In this use case, you can see the importance of using a tBufferOutput component in a child Job to buffer records. The tRunJob reads the records from the buffer and transfer them to the next component.