Expert Consultancy from Yellow Pelican


A site about Talend

tRunJob Component

The Talend tRunJob Component allows you to embed one Talend Job within another so that it may be executed as a Talend SubJob. You can add a tRunJob Component from the Component Palette (Orchestration) of you can drag an existing Job from Job Designs in the Repository Browser.

As can be seen from the following screenshot, I have created two Jobs, Job1 and Job1Child1. Note that I have created a folder named Job1, and this is where I have located the Job Job1Child1. My preference is only to have executable Jobs at the repository top-level and place all Child Jobs in a folder with the same name as their parent Job. You'll also notice that I've created two other directories named Lib and Templates. This is a good way of organising your repository. The Lib directory is for storing reusable Jobs, that may be called from any of your other task-specific Jobs. For an example of a reusable Job, read our tutorial Reusable Context Load Job. I'd strongly recommend that all your task-specific Jobs, call a Job such as this.

Image 1

Component Configuration

If you create the simple example shown here, you can select the component Job1Child1(tRunJob_1) and view its Basic settings in the Component configuration tab, as shown in the screenshot below.

Image 2

Schema Options

You are permitted to define a schema for a tRunJob Component or you may Copy Child Job Schema. This is useful when the child Job produces data as an output (achieved using a tBufferOutput Component). For an example of this feature, see our tutorial Reusable Context Load Job.

Dynamic Job Options

This option allows multiple Jobs to be called and processed. The SubJob will be executed in an independent process and only the latest version of the Job can be executed. This option has other limitations and I have yet to find a use case for this option. For further information on this option, refer to the Talend Help Center tRunJob Reference.

Job Options Options

These options allow you to specify the Job that should be executed, together with its Context. If you added the Component from Job Designs in the Repository Browser then these options will be preset. You may select the Job, Version and Context as required. I have found no use case for either running an old version of a Job or changing its Context with this option.

Use an independent process to run subjob

This option allows you to run the SubJob as an independent process. This may be useful if you are experiencing issues with memory limits. There are limitions with using this option. It is not compatible with the Jobserver cache (if you are using the Enterprise Edition of Talend), meaning that you may not be able to execute the Job from the Talend Command Centre (TAC). This option is not compatible with the Use or register a shared DB Connection option of database connection components.

Die on child error

If you would like the parent Job to continue executing, even if there has been an error in the child Job, then un-check this option.

This is a helpful option (un-checking) when you want to put some specific processing in to a SubJob, check for it's success or failure, and then perorm some specific action based on termination status.

Transmit whole context

This option allows you to transmit the entire Context from a parent Job to a child job.

Expert Consultancy from Yellow Pelican
comments powered by Disqus