Talend tRunJob

In this Talend article, we use this Talend tRunJob component to demonstrate parent-child jobs. This example helps you understand the tBufferOutput, and how to read the data from parent job to child job.

To demonstrate the Talend tRunJob, we use the tSortRow example that we created earlier. Here, we used the tDBInput to choose the customer table, and tSortRow to sort the records in the below-shown order. Instead of saving the output in a table, we are using the tBufferOutput to buffer the data.

Talend tRunJob 1

To show the data, let me connect the tLogRow to the tBufferOutput and run the Talend tRunJob.

Talend tRunJob 2

Create a Talend Parent Job

We created another job and then added the Talend tRunJob component to the designer window.

Talend tRunJob 3

The following screenshot shows the available options.

Talend tRunJob 4

Please click on the Browse job (…) button to select the previously designed job. Here, we selected the Data_Sorting_Parent_Job.

Talend tRunJob 5

First, click on the Copy Child Job Schema to add or load columns in the selected job to the current job. Next, click on the Edit Schema to check and add/remove unwanted columns.

Talend Run Job 6

Please change the version as per your needs. Next, add the Context Parameters (if any).

Talend Run Job 7

Here, we added the tAggregateSortedRow and connected it to Talend tRunJob. Generally, tAggregateSortedRow need sorted data, and our child job sorted those rows using the tSortRow component. Within the tAggregateSortedRow, we grouped the columns by Occupation and performed few aggregations.

Talend Run Job 8

Let me add the tLogRow to show you the aggregated output.

Talend Run Job 9

Please run the Talend tRunJob to see the result.

Talend Run Job 10