DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
Author Message
Nripendra Chand



Group memberships:
Premium Members

Joined: 23 Nov 2004
Posts: 196
Location: Sydney (Australia)
Points: 1606

Post Posted: Tue Aug 23, 2005 4:59 am Reply with quote    Back to top    

DataStage® Release: 7x
Job Type: Parallel
OS: Unix
Hi,

I need to create surrogate keys for all input records. Initial value of the key is 1 and the incremental value is also 1. So keys are 1, 2, 3, 4, 5 ……. We are using 2*2 partitioning. If I use transformer to calculate the key, will it create discrepancies in the output because of the partitioning.
If I use surrogate key generator, will it give me the correct result. If yes, then please explain how surrogate key will produce the correct results?

-Nripendra Chand
vmcburney

Premium Poster
Participant

Group memberships:
Premium Members, Inner Circle, Australia Usergroup

Joined: 23 Jan 2003
Posts: 3510
Location: Australia, Melbourne
Points: 27144

Post Posted: Tue Aug 23, 2005 5:21 am Reply with quote    Back to top    

Reading about it in the Parallel Job Developers Guide may be faster then asking about it on this forum.
Quote:
The stage generates sequentially incrementing unique integers from a given starting point. The existing columns of the data set are passed straight through the stage.

If the stage is operating in parallel each instance will increment by the number of partitions to ensure the numbering is unique. You can duplicate this functionality in a transformer by creating a counter set to @partitionnum - @numpartitions and incrementing it by @numpartitions. I would go for the specialist key generator stage unless you already have a transformer in your job.

_________________
Certus Solutions
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn: Vincent McBurney LinkedIn
Rate this response:  
Not yet rated
richdhan



Group memberships:
Premium Members

Joined: 12 Feb 2004
Posts: 364

Points: 2614

Post Posted: Wed Aug 24, 2005 7:26 am Reply with quote    Back to top    

Searching the forum will yield faster results on different methodologies used for generating sakeys.

We use the column generator, the transformer and the DB stage to generate surrogate keys. Pls search the forum.

HTH
Rich
Rate this response:  
Not yet rated
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours