Page 1 of 1

Get surrogate key / sequence value while inserting record

Posted: Fri Jun 22, 2018 6:34 am
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

Posted: Sun Jun 24, 2018 11:45 pm
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.