Create a Standard Job called ParentJob and configure it
as follows.
Double-click the tFileInputDelimited to open its
Basic settings view and then configure its
parameters.
Click the [...] button next to the
File Name/Stream field and browse to the
source file, in this example in.txt.
Set Header to 1.
Click the Edit schema button and add three
columns to the schema, id as
Integer, name as
String and scope as
Integer.
In the Basic settings of the
tFlowToIterate component, make sure that the
Use the default (key,value) in global variables. box
is checked.
Open the Basic settings view of the
tRunJob component to configure its parameters.
In the Job field, select the child Job, in this example
ChildJob.
In the Context Param field, click the
[+] button to add the two parameters defined in the
Context tab of the child Job, in this example
name and scope.
Define the value for each parameter,
(String)globalMap.get("row1.name") for
name and
(Integer)globalMap.get("row1.scope") for
scope.
Press Ctrl+S to save your changes.
Press F6 to execute the parent Job.
Results
The following results print to the console.
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!