Job Executor
The Job Executor step allows you to execute a Pentaho Data Integration (PDI) job. It is similar to the Transformation Executor step, but works with jobs.
By default, the specified job is executed once for each input row. You can use the input row to set parameters and variables. The executor step then passes this row to the job in the form of a result row.
You can also pass a group of records based on the value in a field, such that when the value changes, the specified job is executed. In these cases, the first row in the group of rows is used to set parameters or variables in the job.
You can also launch multiple copies of this step to assist in parallel job processing.
Note: This step does not abort when the calling job errors out. To control the flow or to abort the job in case of errors, specify the fields and a target step in the Execution results tab to log the number of errors.
Samples
The following sample transformation and job, which demonstrate the capabilities of this step, are available in the distribution package in the design-tools/data-integration/samples/transformations/job-executor folder.
test-trans.ktrPasses three rows (
one,two,three) to a job that is executed three times. It sets a parameter to three different values. You can preview the Results, Result files, and Result rows steps to view the output.test-job.kjbDisplays a message box with the value and set of the result files.

Step name and job
Step name
Specifies the unique name of the step on the canvas. Default: Job Executor.
Job
Specify your job to execute by entering its path or selecting Browse.
If you select a job that has the same root path as the current job, the variable ${Internal.Entry.Current.Directory} is inserted automatically in place of the common root path. For example, if the current job path is /home/admin/transformation.kjb and you select a job in the folder /home/admin/path/sub.kjb, then the path is converted automatically to ${Internal.Entry.Current.Directory}/path/sub.kjb.
If you are working with a repository, specify the name of the job. If you are not working with a repository, specify the XML file name of the job.
Jobs previously specified by reference are converted automatically to use the job name within the Pentaho Repository.
Options
The Job Executor step includes the following tabs.
Parameters
Execution results
Row grouping
Result rows
Result files
Parameters tab
This tab allows you to define or pass variables and or parameters to the job. If multiple rows are passed to the job, the first row can be used to set the parameters or variables.
For each variable or parameter name that you add to the table, assign a value to that parameter in either Variable / Parameter to use or Static input value.
You cannot use both a variable and a static value.
Variable / Parameter name
Specify the name of the variable or parameter.
Variable / Parameter to use
Use this column to set the names of variables and or parameters that are defined and passed to the child job. For this column, enter a value by doing one of the following:
Select an incoming field using the drop-down menu.
Manually enter a variable name.
Use Ctrl+Space to select a value from a list of PDI environment variables.
If you specify a field or value in Variable / Parameter to use, Static input value is disabled.
When Variable / Parameter to use contains a valid value, Inherit all variables from transformation does not affect Variable / Parameter to use.
Static input value
Specify a static value to use instead of a field. Entering a value in Static input value disables Variable / Parameter to use.
Inherit all variables from transformation
Select to pass all variables defined in the parent transformation to the child job.
Get Parameters
Select to insert all defined parameters of the specified job. The parameter description is inserted into Static input value.
Execution results tab
You can define result fields for the job and specify which step in the transformation receives them. If you do not need a certain result, leave its input field blank.
Target step for the execution results
Select a step in the transformation as the target step to receive the results from the job.
N/A
Execution time (ms)
Field name for the job execution time.
ExecutionTime
Execution result
Field name for the job execution result.
ExecutionResult
Number of errors
Field name for the number of errors during job execution.
ExecutionNrErrors
Number of rows read
Field name for the total number of rows read during job execution.
ExecutionLinesRead
Number of rows written
Field name for the total number of rows written during job execution.
ExecutionLinesWritten
Number of rows input
Field name for the total number of input rows during job execution.
ExecutionLinesInput
Number of rows output
Field name for the total number of output rows during job execution.
ExecutionLinesOutput
Number of rows rejected
Field name for the total number of rows rejected during job execution.
ExecutionLinesRejected
Number of rows updated
Field name for the total number of rows updated during job execution.
ExecutionLinesUpdated
Number of rows deleted
Field name for the total number of rows deleted during job execution.
ExecutionLinesDeleted
Number of files retrieved
Field name for the total number of files retrieved during job execution.
ExecutionFilesRetrieved
Exit status
Field name for the exit status of the job execution.
ExecutionExitStatus
Execution logging text
Field name for the logging text from the job execution.
ExecutionLogText
Log channel ID
Field name for the log channel ID used during the job execution.
ExecutionLogChannelID
Row grouping tab
Specify how to group result rows by using one of the following methods:
Specific number of rows
Specific field
Specified duration of time
You can use the result rows in a transformation or job entry, or you can get the records by using the Get rows from result step in a transformation.
To access Field to group rows on or Duration time when collecting rows, delete the default value in Number of rows to send to transformation.
Number of rows to send to transformation
Specify a number. After every n rows, the job is executed and these rows are passed to the transformation.
Field to group rows on
Specify a field for grouping rows. Rows are collected as long as the field value stays the same. If the value changes, the job is executed and the accumulated rows are passed to the transformation.
Duration time when collecting rows
Specify a time in milliseconds. This value is the amount of time the step collects rows prior to job execution.
Result rows tab
In this tab, you can specify the destination of the result rows from the job execution and define the layout of the expected result rows.
Note: This step verifies that the data type of the result row fields is identical to what you specify. If there is a difference, an error occurs.
Target step for result rows
Select a step in the transformation as the target step.
Field name
Specify the name of the field.
Data type
Select the data type of the field, such as Number, Date, or String.
Length
(Optional) Specify the length of the field.
Precision
(Optional) Specify the precision to use.
Result files tab
In this tab, specify the destination of the result files.
Target step for result files information
Select a step in the transformation as the target step.
Result file name field
Specify the field name for the result files.
Last updated
Was this helpful?

