Page 1 of 1

Problem with state file

Posted: Tue Jul 09, 2013 2:06 pm
by srds2
I am facing a issue while using the surrogate key in the transformer, i am reading the max value from a column of a table and updating the surrogate key in the first job which runs in the sequential mode. the settings for the surrogate key generator stage in the job 1 are
key source updated action = update
source type = flat file

the max value that would be updating surrogate key is 10000.
So in job 2 when i am using the same surrogate key in transformer stage i was expecting the value more than 10000. But i am getting two sets for values one staring from 10000 and other starting from 1. how to generate only values greater than 10000?

i have went through the below link but didn't solved my problem.

viewtopic.php?t=127081

Even after deleting and recreating the state file it didn't helped me.

Posted: Wed Jul 10, 2013 3:42 am
by srinivas.nettalam
How is that 10000 passed to the Surr.Key stage and in the job which generates surrogate key (assuming job 2),whats the option selected for Generate Key from Last Highest Value property?

Posted: Wed Jul 10, 2013 6:54 am
by srds2
10000 passed to the Surr.Key stage and in the job which generates surrogate key --we getting maximum value from table and updating the state file.

In the job 2 we were using transformer stage we were not using surrogate key generator stage .There is no option like Generate Key from Last Highest Value property in transformer stage

Posted: Wed Jul 10, 2013 7:55 am
by prasson_ibm
Hi,
There is no such option in Transformer.In Transform it will generate unique number but never guarantee that it will be higher then your last max value.

Posted: Wed Jul 10, 2013 8:22 am
by srds2
prasson_ibm wrote:Hi,
There is no such option in Transformer.In Transform it will generate unique number but never guarantee that it will be higher then your last max value.
Prasson_ibm: In Transform it will generate unique number
Even we had thought same thing but issue we are facing is generating back old keys like starting from 1 which were already inserted in table in previous runs.
Do you any other way to generate key from 10000 in transformer other than using surrogate key generator stage using generate Key from Last Highest Value property to YES

Posted: Wed Jul 10, 2013 8:51 am
by prasson_ibm
Pass this 10000 value as a parameter to Initial value in the transformer and run the job.