What is the difference between OnSubjobOK and OnComponentOK?

Answer

OnSubjobOK and OnComponentOK are trigger links, which can link to another subjob. The main difference between them lies in the execution order of the linked subjob.

  • With OnSubjobOK, the linked subjob starts only when the previous subjob completely finishes.
  • With OnComponentOK, the linked subjob starts when the previous component finishes.

 

What is a subjob?

A subjob is a self-contained subset of a larger Job, composed of components and links.

The following diagram shows a Job with three subjobs:

1_080.png

The execution order of subjobs linked by OnComponentOK is within the execution cycle of the previous subjob. In this example, subjob 2 starts when tLogRow_1 finishes; subjob 3 starts when both subjob 1 and subjob 2 end, because subjob 2 runs within the execution cycle of subjob 1.

Only the first component of a subjob can use the OnSubjobOK link.

Version history
Revision #:
3 of 3
Last update:
‎09-29-2018 12:20 AM
Updated by:
 
Labels (2)
Comments
Four Stars

useful!

Six Stars

Hi

 

Can you please provide me solution for the below scenario?

 

Input:

StingidStringidentifierFiscalyearQuarter1Salesvolume1Quarter2Salesvolume2Quarter3Salesvolume3Quarter4Salesvolume4
14360NewyorkFY-2014Q1250Q2350Q3450Q4450
14360LondonFY-2014Q1350Q2450Q350Q456
15602NewyorkFY-2015Q1400Q2500Q330Q4100
15602LondonFY-2015Q1200Q2600Q310Q4150

 

Output:

 

StingidFiscalyearQuarterSalesvolume
14360FY-2014Q1sum value
14360FY-2014Q2sum value
14360FY-2014Q3sum value
14360FY-2014Q4sum value
Community Manager

Hi @prasan

For this sort of assistance, please post your question in the appropriate Community discussion forum, or contact Talend Support.

HTH,

Alyce

Six Stars
Hi

Thanks for replying,

I am new to this talend community
May I know on which discussion should I post this question.
Community Manager

Hi @prasan,

It sounds like you're asking for help designing a Job, so you might try the Design and Development board.

HTH,

Alyce

Four Stars

Very excellent article with a clear explanation!

However, where does the 'IF' trigger fit in the precedence list?

For example, say I want to test if a file exist, if-true, delete it, and then create a new one (after deleting!), would this work?

talend_ss01.PNG

Community Manager

Hi @rouxrei,

You'll get more answers to your question if you ask it on one of the discussion boards, such as the Design and Development board.

HTH,

Alyce