Page 1 of 1

How to trigger one link after the other

Posted: Mon Aug 17, 2009 5:55 am
by vputta
I have a parallel job which has a transformer stage with 2 output links.Separate constraints will be there for each link.Both the output links will be connected to DB2/UDB enterprise stages which have Update queries to Update the same tables.
So, as we know that we cant Update the same table at a time with two update queries I just want to know how to trigger the second link after the first link.Whether i can keep any constraints on the job such that the first link is executed before the second.

Thanks,
vputta

Posted: Mon Aug 17, 2009 6:31 am
by miwinter
I'd disagree with not being able to update the same table at the same time to start with - it totally depends on the impact of those queries and the level of locking they cause. Having said that, I don't believe you can achieve what you require, link ordering will make one link operate before another, but at a row level. You need dependencies in place between different jobs if you still want to achieve what you were setting out to.

Posted: Mon Aug 17, 2009 6:39 am
by chulett
Based on the way the question is asked - "trigger the second link after the first link" - that's how it works and is controlled by Link Ordering. If you mean what miwinter surmised, it cannot be done directly but can be achieved by introducing a "process break" in the second link before the target stage. This will allow the first link to complete before the second link starts delivering any rows.

Luckily, there was a post recently on this very topic which a search for... "process break"... should turn up because I used the same phrase there, from what I recall.

Posted: Mon Aug 17, 2009 6:52 am
by vputta
Yeah i agree that it depends upon the no. of recs being updated thru the query.
So if i want to run the second update query after the first i need to break the job into 2 ?

Posted: Mon Aug 17, 2009 6:55 am
by miwinter
No, my opinion was that it couldn't be achieved. However, Craig has since intimated to the contrary :)

Posted: Mon Aug 17, 2009 6:57 am
by ArndW
I responded to that thread and wrote a small test program and it worked. Basically one knows that the reject output link from a database stage doesn't finish until the writes are complete, so if one makes that link go to a funnel (not set to "continuous") then one can force temporal dependencies.

Re: How to trigger one link after the other

Posted: Mon Aug 17, 2009 7:42 am
by vputta
Arndw..could u be more specific ?

Posted: Mon Aug 17, 2009 8:50 am
by ArndW
This is thread which Craig suggested you look at.