Surrogate key limit

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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The largest uint64 (unsigned BigInt) value is 18,446,744,073,709,551,615 which contains 20 digits.

Therefore your expression should allow for up to 20 characters.

Code: Select all

Right(Str("0",20) : InLink.SKey, 20)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
srds2
Premium Member
Premium Member
Posts: 66
Joined: Tue Nov 29, 2011 6:56 pm

Post by srds2 »

Thanks Ray for the information. I will implement this logic in my job and check the result.

Thanks.
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

uint64 (unsigned BigInt) = 64 bits or 8 bytes... not to be confused with the number of digits or characters in a string. :)

uint32 (unsigned Integer) = 4 bytes and up to 10 digits, so I'm not sure how you hit a limit of 9 digits. Double check your data types and functions used to generate the SKey.
Choose a job you love, and you will never have to work a day in your life. - Confucius
Post Reply