Get surrogate key / sequence value while inserting record

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
satheesh_color
Participant
Posts: 182
Joined: Thu Jun 16, 2005 2:05 am

Get surrogate key / sequence value while inserting record

Post by satheesh_color »

Hi Team,


We have a requirement, we were generating seq.nextval key through DB insert statements. Is there any way can we capture the same key value with the same job.


kindly let me know your thoughts on the same.



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

Post by ray.wurlod »

Yes, you can use the Surrogate Key Generator stage.

One of its methods of operation is to retrieve the next value from a database sequence.

It can be made more efficient by retrieving a block of next values (for example the next 200 records at a time) to reduce the number of queries against the database, particularly if the database host is remote from the DataStage engine host.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply