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.
Problem with state file
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 134
- Joined: Tue Jun 15, 2010 2:10 am
- Location: Bangalore
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
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
-
- Premium Member
- Posts: 536
- Joined: Thu Oct 11, 2007 1:48 am
- Location: Bangalore
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.
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.
Thanks
Prasoon
ETL Consultant
LinkedIn :- http://www.linkedin.com/profile/view?id ... ab_pro_top
Blog:- http://dsshar.blogspot.com/
Prasoon
ETL Consultant
LinkedIn :- http://www.linkedin.com/profile/view?id ... ab_pro_top
Blog:- http://dsshar.blogspot.com/
Prasson_ibm: In Transform it will generate unique numberprasson_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.
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
-
- Premium Member
- Posts: 536
- Joined: Thu Oct 11, 2007 1:48 am
- Location: Bangalore
Pass this 10000 value as a parameter to Initial value in the transformer and run the job.
Thanks
Prasoon
ETL Consultant
LinkedIn :- http://www.linkedin.com/profile/view?id ... ab_pro_top
Blog:- http://dsshar.blogspot.com/
Prasoon
ETL Consultant
LinkedIn :- http://www.linkedin.com/profile/view?id ... ab_pro_top
Blog:- http://dsshar.blogspot.com/