Transformer Execution Sequence In Datastage

Transformer Execution Sequence In Datastage Rating: 9,8/10 1283 votes
  1. Transformer Execution Sequence In Datastage Training

Since January 2006Group memberships:Premium Members, Inner Circle, Server to Parallel Transition GroupJoined: 12 Nov 2002Posts: 42970Location: Denver, COPoints: 221615Posted: Sat Jan 15, 2011 12:11 pmWelcome.Just for grins, why the 'in transformer' part of your question? Why not use the stage that exists just to generate sequence numbers - i.e. The Surrogate Key Generator stage?-craigHelp I'm steppin' into the twilight zone, place is a madhouse, feels like being coldMy beacon's been moved under moon and star, where am I to go now that I've gone too far? Not yet ratedsince January 2006Group memberships:Premium Members, Inner Circle, Server to Parallel Transition GroupJoined: 12 Nov 2002Posts: 42970Location: Denver, COPoints: 221615Posted: Sat Jan 15, 2011 4:07 pmYou'll find several versions of the formula if you do an exact search for NUMPARTITIONS in the forums, which should help answer your question. This one allegedly works fine.-craigHelp I'm steppin' into the twilight zone, place is a madhouse, feels like being coldMy beacon's been moved under moon and star, where am I to go now that I've gone too far? Not yet ratedParticipantJoined: 06 Jun 2009Posts: 41Location: KolkataPoints: 281Posted: Sat Jan 15, 2011 9:44 pmIf the surrogate key stage is not available to you, you may take the help of stage variables present in the transformer stage.SV + 1: SV (Initialize it to 0)Move this SV into your surrogate key column.So, when the first record comes the SV is set to 0.

After executing the above statement, the variable will hold the value 1.For second record, SV is set to 1. After executing the above statement, the variable will hold the value 2 and so on.This design may work if it is a one-time run. But to incorporate it in some daily job run, you may need to take care where to initialize this variable. At the very sequence level you will have to fetch the next surrogate key value and pass it to the job. You may write a routine for this purpose. Say you have stored this value in the job parameter NSK. Now you need to add another job parameter asNSK + SV: SV1Now move this SV1 in the surrogate key column.Hope this helps you solve the problem.

DatastageTransformer

Let me know the outcome.Nayan. Not yet ratedsince January 2006Group memberships:Premium Members, Inner Circle, Server to Parallel Transition GroupJoined: 12 Nov 2002Posts: 42970Location: Denver, COPoints: 221615Posted: Sun Jan 16, 2011 8:53 ammgendy wrote:the Surrogate Key will do the same behavior if it is operat in parallel, to resolve that you should use either the Surrogate Key or the Tansformer in sequential modeIf you are saying that the Surrogate Key Generator stage will 'do the same' if not run sequential, as in not produce unique numbers across partitions, that would be incorrect. Unless that's a failing of the early 7.1 version of it, hard to remember that far back.-craigHelp I'm steppin' into the twilight zone, place is a madhouse, feels like being coldMy beacon's been moved under moon and star, where am I to go now that I've gone too far? Not yet ratedGroup memberships:Premium MembersJoined: 10 Sep 2009Posts: 44Points: 401Posted: Sun Jan 16, 2011 9:03 amchulett wrote:mgendy wrote:the Surrogate Key will do the same behavior if it is operat in parallel, to resolve that you should use either the Surrogate Key or the Tansformer in sequential modeIf you are saying that the Surrogate Key Generator stage will 'do the same' if not run sequential, as in not produce unique numbers across partitions, that would be incorrect. Unless that's a failing of the early 7.1 version of it, hard to remember that far back.Exactly thats what i mean, i tried it before and get that result may be for srot or partitioning problem, but that was the resultMohmmed ElgendySenior System AnalystData IntegrationTeamEtisalat Egypt+161.

Not yet ratedsince February 2006Group memberships:Premium Members, Heartland UsergroupJoined: 16 Jun 2005Posts: 5244Points: 26374Posted: Wed Jul 26, 2006 3:01 amAnother work of full Wurlod for Server transformerCode:1. Any before-stage subroutine is executed. If ErrorCode is non-zero, the job aborts.2. A row is obtained from the stream input link.3. For each reference input link, in the specified execution order:(a) the reference key expression is evaluated(b) a 'get by key' request is issued (this handles supply of NULL values if that record is not found4. Stage variables are evaluated in the order in which they appear in their grid.5. The REJECTED variable is set to TRUE6.

For each output link, in the specified execution order:(a) the output link constraint expression is evaluated(b) if the output link constraint expression is satisfied, column derivation expressions on that link are evaluated then a 'put' request is issued and the REJECTED variable is set to FALSE(c) if the output link is marked as handling rejects, and the REJECTED variable is TRUE, column derivation expressions on that link are evaluated then a 'put' request is issued7. If the row count reaches a particular value, the stage's status record in the RTSTATUSnn table for the job is updated8. If the 'end of data' token has not been received, go back to step 2.9. Any after-stage subroutine is executed.

Transformer Execution Sequence In Datastage Training

If ErrorCode is non-zero, the job aborts.Just skip the lookup option, since its not possiblein PX.Impossible doesn't mean 'it is not possible' actually means. 'NOBODY HAS DONE IT SO FAR'.