Databases Reference
In-Depth Information
Although the subjob connector has been linked from the first component
in the first subjob, note that Talend treats this as, when the whole of the first
subjob completes (without error), execute the second subjob . The On Subjob
triggers can only be set from the first component in a subjob and, if you
right-click on the delimited output component, you will see that On
Subjob OK or On Subjob Error is not available in its menus. Note that,
without the OnSubjobOK trigger, the two subjobs—the extract to file
and the archive—would run in an arbitrary and unpredictable order. This
could mean that the archive might attempt to execute before the extract
file has been written and so not achieve the results we require.
15. Now run the job. As expected, the delimited file is created and this is then
zipped in the same directory.
On Subjob Error
Let's extend our first example by illustrating how a job can be made to take different
execution paths based on what happens during the running of the job.
In the previous example we configured an OnSubjobOK example, but what
if the subjob did not work as expected? The Studio also offers another subjob
connector— OnSubjobError —for this situation. Let's modify the job to show
this; perform the following steps:
1.
Search for message in the Palette window and drop a tMsgBox component
onto the designer.
2.
We can accept most of the default settings for this component, but change
the Message parameter to Something Went Wrong!! .
 
Search WWH ::




Custom Search