Scenario: Job execution in a loop - 6.1

Talend Components Reference Guide

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 Data Quality
Talend Open Studio for ESB
Talend Open Studio for MDM
Talend Real-Time Big Data Platform
Talend Studio
Data Governance
Data Quality and Preparation
Design and Development

This scenario describes a Job composed of a parent Job and a child Job. The parent Job implements a loop which executes a child Job five times, with a pause of three seconds between each two executions.

  1. Create a Parent Job, and drop tLoop, tRunJob, and tSleep components to the workspace.

  2. Connect tLoop to tRunJob using a Row > Iterate connection, and connect tRunJob to tSleep using a Row > Main connection.

  3. Create a Child Job, and drop tRowGenerator and tLogRow components to the workspace.

  4. Connect tRowGenerator to tLogRow using a Row > Main connection.

  5. On the Basic settings view of the tLoop component, choose For loop type and type in the instance number to start from (1), to finish with (5) and the step (1).

  6. On the Basic settings view of the tRunJob component, select Child Job in the Job field.

  7. On the Basic settings view of the tSleep component, enter 3 in the Pause field.

  8. Double-click tRowGenerator to open the schema editor. Then click the plus button to add four new columns:

    • id, to generate sequence numbers

    • firstname, to generate random first names

    • lastname, to generate random last names

    • city, to generate random city names

    For more information about tRowGenerator, see tRowGenerator.

  9. Press F6 to run the Parent Job.

    The Child Job will be executed five times with a three-second pause between each two executions, displaying random personal information on the Run console as configured in the tRowGenerator component.