Create a new Job ParentJob and add a
tFileList component and a tRunJob component to it.
Connect the tFileList component to the
tRunJob component using a Row > Iterate link.
Double-click the tFileList
component to open its Basic settings
view.
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.
In the FileList Type list,
select Files.
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.
Double-click the tRunJob
component to display its Basic settings
view.
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.
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.
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!