Skip to main content Skip to complementary content

Setting up the parent Job

Procedure

  1. Create a new Job ParentJob and add a tFileList component and a tRunJob component to it.
  2. Connect the tFileList component to the tRunJob component using a Row > Iterate link.
  3. Double-click the tFileList component to open its Basic settings view.
  4. In the Directory field, specify the path to the directory that holds the files to be processed, or click the [...] button next to the field to browse to the directory.

    In this example, the directory is D:/tRunJob_Input_Files that holds three delimited files with up to five columns.

  5. In the FileList Type list, select Files.
  6. Select the Use Glob Expressions as Filemask check box, and then click the [+] button to add a line in the Files area and define a filter to match files. In this example, enter "*.csv" to retrieve all delimited files.
  7. Double-click the tRunJob component to display its Basic settings view.
  8. Click the [...] button next to the Job field and in the pop-up dialog box, select the child Job you want to execute and click OK to close the dialog box. The name of the selected Job appears in the Job field.
  9. In the Context Param area, click the [+] button to add a line and define the context parameter. The only context parameter defined in the child Job, named FilePath, appears in the Parameters cell.
  10. Click in the Values cell, press Ctrl+Space on your keyboard to access the list of context variables, and select tFileList_1.CURRENT_FILEPATH.

    The corresponding context variable ((String)globalMap.get("tFileList_1_CURRENT_FILEPATH")) appears in the Values cell.

    For more information on context variables, see Talend Studio User Guide.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!