More than one trigger (subjob dependencies)?

Highlighted
One Star

More than one trigger (subjob dependencies)?

Hello,

is it possible to run a Subjob only if two more Jobs ran sucessfully (more than one Job dependency). 
Something like that
Subjob D waits for finishing Subjob A and B
Subjob E waits for Subjob A and C
Subjob F has to wait for D and E
...
Is it possible to run a Subjob if at least one Job has finished:
Subjob C waits until Subjob A OR Subjob B has finished

Thanks
Talend DI Newbie

Highlighted

Re: More than one trigger (subjob dependencies)?

Hi Olbu,
A  ---onSubJobOk--- C
                            |
                         Runif     
                            |
                           B

Here ,  In subJob B , try to set globalMap variable and In Runif ,try to get value and check  it is not null.  
Note that You cannot have 2 onSubJobOk link on 1 Component. So you have to eliminate this limitation by using Runif link in second subjob.

I hope, it will help you.
Regards,
Amol
Highlighted
One Star

Re: More than one trigger (subjob dependencies)?

Hi Amol,
thanks, but I think that this couldn't work. C depends on a successful run of A and B. In your case Talend DI starts C also if only A would be ready.
But, yes. We could implement this with few "run if"-trigger. Today we would define a tPrejob wich defines a global variable (tSetGlobalVar)
Name:
"myTriggerCount"

Value:
new java.util.concurrent.atomic.AtomicInteger(0)

The last component of our A and B would have the following "run if"-trigger condition:

((java.util.concurrent.atomic.AtomicInteger) globalMap.get("myTriggerCount")).incrementAndGet()==2


, but we hoped that there would be some stages which support such scenarios by default. (Perhaps we also need to check the Status of the last component of A and B)
Thanks
Oliver

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog