surrogate key stage's start value

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
djoni
Participant
Posts: 98
Joined: Wed Oct 05, 2005 1:01 pm

surrogate key stage's start value

Post by djoni »

do the keys generated start at the start value at every run of the job that uses the surrogate key stage?
or the next value after the last run's highest value?

djoni
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Hi djoni,
Yes it will restart.
If you need the key to continue from the previou run, you need to fram the logic of the surrogate key by yourself may be in transformer.

-Kumar
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

You can set the surrogate key start value to a job parameter and pass in the start value every time you run the job. The max value can be retrieved by the Sequence job by a shell execute script that runs SQL or isql or db2 commands.
Post Reply