Surrogate Key Generator Stage---How It works ?
Posted: Tue May 17, 2011 3:30 am
I have designed a job as below
1) Source stage => Sequential file which is reading 3 columns as A,B,C.
2) Intermediate stage => Surrogate key generator stage where I am generating Column D. Here I am using Oracle Database sequence.
3) Target stage => Sequential File to capture all the columns A,B,C,D.
I am running this job using 2 node configuration file for 38 records. Below is my observation
Before running the job
-----------------------
LAST_NUMBER of database sequence is => 121
After running the job
-----------------------
LAST_NUMBER of databse sequence is => 161
Cross validation
----------------------
After checking the target file I found that
minimum value of column D generated by surrogate key generator stage is => 121 ( Based on above info it is supposed to be 122, i.e LAST_NUMBER +1 )
maximum value of column D generated by surrogate key generator stage is => 158 ( Based on above info it is supposed to be 159 )
Why this kind of value mismatch in Database Sequence and target file.
Also Please clarify the concept behind surrogate key generator stage using DB sequence, I mean how the file value and sequence value gets updated etc etc.
1) Source stage => Sequential file which is reading 3 columns as A,B,C.
2) Intermediate stage => Surrogate key generator stage where I am generating Column D. Here I am using Oracle Database sequence.
3) Target stage => Sequential File to capture all the columns A,B,C,D.
I am running this job using 2 node configuration file for 38 records. Below is my observation
Before running the job
-----------------------
LAST_NUMBER of database sequence is => 121
After running the job
-----------------------
LAST_NUMBER of databse sequence is => 161
Cross validation
----------------------
After checking the target file I found that
minimum value of column D generated by surrogate key generator stage is => 121 ( Based on above info it is supposed to be 122, i.e LAST_NUMBER +1 )
maximum value of column D generated by surrogate key generator stage is => 158 ( Based on above info it is supposed to be 159 )
Why this kind of value mismatch in Database Sequence and target file.
Also Please clarify the concept behind surrogate key generator stage using DB sequence, I mean how the file value and sequence value gets updated etc etc.