Skip to main content

Component-specific settings for tRunJob

The following table describes the Job script functions and parameters that you can define in the setSettings {} function of the component.

Function/parameter Description Mandatory?

USE_DYNAMIC_JOB

Set this parameter to true to enable the Use dynamic job option, which allows multiple Jobs to be called and processed.

When this option is enabled, only the latest version of the Jobs can be called and processed. An independent process will be used to run the subjob.

Information noteWarning:
  • This option is not compatible with the Talend JobServer cache. Therefore, the execution may fail if you run a Job that contains tRunJob with this option enabled in Talend Administration Center.

  • This option is incompatible with the Use or register a shared DB Connection option of database connection components. When tRunJob works together with a database connection component, enabling both options will cause your Job to fail.

No

CONTEXT_JOB

Use this parameter to specify:

  • the name of the Job that you want to call from the list of Jobs specified.
  • a global variable or a defined context variable to load dynamically the Job you want to call from the list of Jobs specified.

This parameter works only when the USE_DYNAMIC_JOB parameter is set to true.

Information noteWarning:

Make sure that the specified Job or the Job represented by the specified variable matches one of the specified process IDs.

Yes if USE_DYNAMIC_JOB is set to true

PROCESS

Use this parameter to specify:

  • the name of the Job to be called.
  • the name of each of the Jobs to be called when the USE_DYNAMIC_JOB parameter is set to true, using a semicolon (;) to separate different Job names.

Yes

PROCESS:PROCESS_TYPE_CONTEXT

Use this parameter to specify the context defined for the Job to be called by the tRunJob.

This parameter is meaningful only the USE_DYNAMIC_JOB parameter is not provided or is set to false.

Yes if USE_DYNAMIC_JOB is set to false

PROCESS:PROCESS_TYPE_PROCESS

Use this parameter to specify:

  • the process ID of the Job to be called.
  • the process ID of each of the Jobs to be called when the USE_DYNAMIC_JOB parameter is set to true, using a semicolon (;) to separate different process IDs.

To get the process ID of a Job, go to the <studiodir>/workspace/<projectname>/<processdir>/<jobfolder> directory, open the file <job>.properties using an XML file editor. The process ID is the value of the id attribute of the TalendProperties:Property element, where:

  • <studiodir> is the directory where Talend Studio is installed;
  • <projectname> is the project name;
  • <processdir> is the folder that contains the properties files of your Jobs. There are several folders:
    • process for Standard Jobs
    • process_mr for Spark Batch Jobs
    • process_storm for Spark Streaming Jobs
  • <jobfolder> is the Job folder if the Job isn't created under the root of the Repository tree;
  • <job> is the full name of the Job including its version.

Make sure you already executed once the Job or Jobs to be called beforehand to ensure a smooth run through the tRunJob.

Yes

PROCESS:PROCESS_TYPE_VERSION

Use this parameter to specify the version of the child Job you want to run.

By default, the latest version of the child Job will be run.

This parameter is meaningful only the USE_DYNAMIC_JOB parameter is not provided or is set to false.

No

USE_INDEPENDENT_PROCESS

Set this parameter to true to use an independent process to run the subjob. This helps in solving issues related to memory limits.

This parameter is meaningful only the USE_DYNAMIC_JOB parameter is not provided or is set to false.

Information noteWarning:
  • This option is not compatible with the Talend JobServer cache. Therefore, the execution may fail if you run a Job that contains tRunJob with this option enabled in Talend Administration Center.

  • This option is incompatible with the Use or register a shared DB Connection option of database connection components. When tRunJob works together with a database connection component, enabling both options will cause your Job to fail.

No

DIE_ON_CHILD_ERROR

Set this parameter to false to execute the parent Job even if an error occurs when executing the child Job.

By default, this parameter is set to true.

No

TRANSMIT_WHOLE_CONTEXT

Set this parameter to true to get all the context variables from the parent Job. Set it to false to get all the context variables from the child Job.

If this parameter is set to true when the parent and child Jobs have the same context variables defined:

  • the variable values for the parent Job will be used during the child Job execution if no relevant values are defined in the CONTEXTPARAMS function.

  • otherwise, the values defined in the CONTEXTPARAMS function will be used during the child Job execution.

No

CONTEXTPARAMS {}

In this function, use the following parameters to change the value of the context variables defined in the child Job.

  • PARAM_NAME_COLUMN: Use this parameter to specify the context variable you want to change the value of.
  • PARAM_VALUE_COLUMN: Use this parameter to specify a new value for the context variable.

The values defined here will be used during the child Job execution even if the TRANSMIT_WHOLE_CONTEXT parameter is set to true.

No

PROPAGATE_CHILD_RESULT

Set this parameter to true to propagate the output data stored in the buffer memory via a tBufferOutput component in the child Job to the output component in the parent Job.

By default, this parameter is set to false.

This parameter is meaningful only the USE_DYNAMIC_JOB parameter is not provided or is set to false.

No

PRINT_PARAMETER

Set this parameter to true to display the internal and external parameters in the Run console.

No

TSTATCATCHER_STATS

Set this parameter to true to gather the processing metadata at the Job level as well as at each component level.

By default, this parameter is set to false.

No

LABEL

Use this parameter to specify a text label for the component.

No

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!