how do we generate surroget keys

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
bunny
Participant
Posts: 10
Joined: Thu Apr 21, 2005 8:06 am
Contact:

how do we generate surroget keys

Post by bunny »

hi to all,

i am new to datatstage, i am working on datastage enterprise edition. input data contains fundname as one of the filed, in output i have to generate system generated identifier for based on fund name. how it is possible . i know that we have to generate surrogate key for each fundname, but i don't know how to generate surrogate keys.

in parallel jobs we have to use surrogate key generator, how do we generate in server jobs?


thanks .
rgandra
Premium Member
Premium Member
Posts: 49
Joined: Mon Aug 02, 2004 9:31 am
Contact:

Post by rgandra »

hi

You can use the routines like gennextkey to generate surrogate keys.

-sandeep
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Depending on your data base you may also be able to use a sequence or a SERIAL data type or a GUID. All a surrogate key has to be is unique, but you must have some mechanism for returning it to DataStage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Luk
Participant
Posts: 133
Joined: Thu Dec 02, 2004 8:35 am
Location: Poland
Contact:

Post by Luk »

you can use GetNextKeyValue routine in transformer stage to generate integer number sequence wchich you can link with old keys and use it as surrogate keys
LUK
Post Reply