Scenario 3: Propagating the buffered output data from the child Job to the parent Job - 6.3

Talend Open Studio for Big Data Components Reference Guide

EnrichVersion
6.3
EnrichProdName
Talend Open Studio for Big Data
task
Data Governance
Data Quality and Preparation
Design and Development
EnrichPlatform
Talend Studio

In this scenario, a three-component Job calls a two-component child Job and displays the buffered output data of the child Job, instead of the data from the input flow of the parent Job, on the console.

Setting up the child Job

  1. Create a Job named child, and add two components by typing their names on the design workspace or dropping them from the Palette to the design workspace:

    • a tFixedFlowInput, to generate a message

    • a tBufferOutput, to store the generated message in the buffer memory

  2. Connect the tFixedFlowInput component to the tBufferOutput component using a Row > Main connection.

  3. Double-click the tFixedFlowInput component to open its Basic settings view.

  4. Click the [...] button next to Edit schema to open the [Schema] dialog box and define the schema of the input data. In this example, the schema has only one column message of the string type.

    When done, click OK to validate the changes and then click Yes in the pop-up [Propagate] dialog box to propagate the schema to the next component.

  5. In the Mode area, select Use Single Table option, and define the corresponding value for the message column in the Values table. In this example, the value is "message from the child job".

Setting up the parent Job

  1. Create a Job, and add three components by typing their names on the design workspace or dropping them from the Palette to the design workspace:

    • a tFixedFlowInput, to generate a message

    • a tRunJob, to call the Job named child

    • a tLogRow, to display the execution result on the console

  2. Connect the tFixedFlowInput component to the tRunJob component and the tRunJob component to the tLogRow component using the Row > Main connections.

  3. Double-click the tFixedFlowInput component to open its Basic settings view.

  4. Click the [...] button next to Edit schema to open the [Schema] dialog box and define the schema of the input data. In this example, the schema has only one column message of the string type.

    When done, click OK to validate the changes.

  5. In the Mode area, select the Use Single Table option, and define the corresponding value for the message column in the Values table. In this example, the value is "message from the parent job".

  6. Click the tRunJob component and then click the Component tab to open its Basic settings view.

  7. Click the Sync columns button and then click Yes in the pop-up [Propagate] dialog box to retrieve the schema from the preceding component.

  8. Click the [...] button next to the Job field to open the [Repository Content] dialog box.

    In the [Repository Content] dialog box, select the Job named child and then click OK to close the dialog box.

  9. In the Advanced settings view of the tRunJob component, select the Propagate the child result to the output schema check box. With this check box selected, the buffered output of the child Job will be propagated to the output component.