DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
This topic has been marked "Resolved."
Author Message
srds2



Group memberships:
Premium Members

Joined: 29 Nov 2011
Posts: 66

Points: 821

Post Posted: Tue Jul 09, 2013 2:06 pm Reply with quote    Back to top    

DataStage® Release: 8x
Job Type: Parallel
OS: Unix
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.

http://www.dsxchange.com/viewtopic.php?t=127081

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



Joined: 15 Jun 2010
Posts: 134
Location: Bangalore
Points: 1030

Post Posted: Wed Jul 10, 2013 3:42 am Reply with quote    Back to top    

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?

_________________
N.Srinivas
India.
Rate this response:  
Not yet rated
srds2



Group memberships:
Premium Members

Joined: 29 Nov 2011
Posts: 66

Points: 821

Post Posted: Wed Jul 10, 2013 6:54 am Reply with quote    Back to top    

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
Rate this response:  
Not yet rated
prasson_ibm



Group memberships:
Premium Members

Joined: 11 Oct 2007
Posts: 536
Location: Bangalore
Points: 4830

Post Posted: Wed Jul 10, 2013 7:55 am Reply with quote    Back to top    

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.

_________________
Thanks
Prasoon
ETL Consultant
LinkedIn :- http://www.linkedin.com/profile/view?id=61317902&trk=hb_tab_pro_top
Blog:- http://dsshar.blogspot.com/
Rate this response:  
Not yet rated
srds2



Group memberships:
Premium Members

Joined: 29 Nov 2011
Posts: 66

Points: 821

Post Posted: Wed Jul 10, 2013 8:22 am Reply with quote    Back to top    

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
Rate this response:  
Not yet rated
prasson_ibm



Group memberships:
Premium Members

Joined: 11 Oct 2007
Posts: 536
Location: Bangalore
Points: 4830

Post Posted: Wed Jul 10, 2013 8:51 am Reply with quote    Back to top    

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=61317902&trk=hb_tab_pro_top
Blog:- http://dsshar.blogspot.com/
Rate this response:  
Not yet rated
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours