Not able to generate a 4 digit surrogate Key

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
bhargava129189
Participant
Posts: 18
Joined: Tue Nov 15, 2005 9:36 am

Not able to generate a 4 digit surrogate Key

Post by bhargava129189 »

Hi all,

I am facing a problem generating 14 digit surrogate keys. using surrogate key gen. I guess it supports max 10 digit keys.

I know that i can use row generator to generate sequence of numbers.
But row generator works in sequential mode.

Even transformer can be used in sequential mode. Can i use transformer in parallel mode and still generate keys for each natural key(ascending order)?

Is there any alternative that i can use to generate 14 digit keys without compromising on performance.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

In version 7.5 and earlier the Surrogate Key Generator supports up to uint32 - that is, a 10-digit key. You can satisfy yourself that this is so by inspecting the stage type properties.

In version 8.0 there is support for uint64 in the Surrogate Key Generator stage.

Row Generator stage works in sequential mode by default, but can be set up to execute in parallel mode. Go to the Advanced tab on the Stage properties. Set the cycle initial value to "part" and the increment to "partcount".
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
nick.bond
Charter Member
Charter Member
Posts: 230
Joined: Thu Jan 15, 2004 12:00 pm
Location: London

Post by nick.bond »

If you just need to run this job once creating a 'one off' list of SKs then you could use a transformer in parallel with

Code: Select all

@PARTITIONNUM * 10000000000000 + @OUTROWNUM
I don't have EE here so the system variable may not be called @PARTITIONNUM but it's something similar.
Regards,

Nick.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Refer here.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply