Page 1 of 1

Surrogate Key Generation

Posted: Mon Jun 08, 2015 11:48 pm
by dsdoubt
Hi,

This is very basic question. I know, this must have been discussed already. I tried searching the forum, but couldnt find the right link.

I need to generate Surrogate key using Surrogate key Gen stage.

This is what I did.

I created a job with a Row Gen and Surroage Key stage and created a Surrogate key file.

Used the same file path in the actual job where the value has to be used in Transformer. Used the NextSurrogateKey() to increment the value.

Its working so far. But Iam not sure, what to pass the Initial Value as. So for every run, the jobs starts the value from '1' which I had given. I need to make it increment from the last value of the previous run. May I now the right option on what do I pass the first time and what do I pass each time?

Thanks.

Posted: Tue Jun 09, 2015 1:31 am
by ray.wurlod
There are three job designs using the SKG stage.

A job with no input or output link will create the state file.

A job with an input link only can be used to initialize the state file.

A job with an output link only can be used to deliver surrogate key values.

Posted: Tue Jun 09, 2015 7:14 am
by chulett