How to trigger one link after the other

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
vputta
Premium Member
Premium Member
Posts: 47
Joined: Wed Oct 08, 2008 7:35 am
Location: Charlotte

How to trigger one link after the other

Post 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
miwinter
Participant
Posts: 396
Joined: Thu Jun 22, 2006 7:00 am
Location: England, UK

Post 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.
Mark Winter
<i>Nothing appeases a troubled mind more than <b>good</b> music</i>
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
vputta
Premium Member
Premium Member
Posts: 47
Joined: Wed Oct 08, 2008 7:35 am
Location: Charlotte

Post 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 ?
miwinter
Participant
Posts: 396
Joined: Thu Jun 22, 2006 7:00 am
Location: England, UK

Post by miwinter »

No, my opinion was that it couldn't be achieved. However, Craig has since intimated to the contrary :)
Mark Winter
<i>Nothing appeases a troubled mind more than <b>good</b> music</i>
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
vputta
Premium Member
Premium Member
Posts: 47
Joined: Wed Oct 08, 2008 7:35 am
Location: Charlotte

Re: How to trigger one link after the other

Post by vputta »

Arndw..could u be more specific ?
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

This is thread which Craig suggested you look at.
Post Reply