Surrogate Key producing one extra key
Moderators: chulett, rschirm, roy
Surrogate Key producing one extra key
My job looks as follow:
Job 1
Dataset --> Surrogate Key Generator -> Oracle
Input dataset has 475 Records.
When I observed log there is something i could not understand.
In the log it shows Output 0 produced 476 records although in dataset only 475 Records are there.
can we do anything about this?
Thanks,
Birendra
Job 1
Dataset --> Surrogate Key Generator -> Oracle
Input dataset has 475 Records.
When I observed log there is something i could not understand.
In the log it shows Output 0 produced 476 records although in dataset only 475 Records are there.
can we do anything about this?
Thanks,
Birendra
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI
In the dataset it is just 475 records and 475 records got loaded to the database. The message is flagged against the surrogate key stage. Also there is one extra surrogate key is getting generated. i.e for the first load say key is generated from 1 to 475 and in the next run it is generating from 477 instead of 476.
Birendra
I have changed the Oracle to Sequential file.
SO my job is now
Dataset ->> Surrogate Key Stage -->> Sequential file.
I ran the Job twice. Surrogate key stage runs in the Sequential mode.
I could see that the in the First run the SK is generated from 1 to 475 and in the Next run it generated from 477 to 951. There is a gap between last generated value from Last value from the 1st Run and First value in the Second Run. Did anyone saw such case?
Thanks in Advance,
Birendra
SO my job is now
Dataset ->> Surrogate Key Stage -->> Sequential file.
I ran the Job twice. Surrogate key stage runs in the Sequential mode.
I could see that the in the First run the SK is generated from 1 to 475 and in the Next run it generated from 477 to 951. There is a gap between last generated value from Last value from the 1st Run and First value in the Second Run. Did anyone saw such case?
Thanks in Advance,
Birendra
Birendra
-
- Premium Member
- Posts: 536
- Joined: Thu Oct 11, 2007 1:48 am
- Location: Bangalore
What blocksize you have selected?
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/
-
- Premium Member
- Posts: 536
- Joined: Thu Oct 11, 2007 1:48 am
- Location: Bangalore
If the key source is a flat file, specify how keys are generated:
Code: Select all
■To generate keys in sequence from the highest value that was last used, set the Generate Key from Last Highest Value property to Yes. Any gaps in the key range are ignored.
■To specify a value to initialize the key source, add the File Initial Value property to the Options group, and specify the start value for key generation.
■To control the block size for key ranges, add the File Block Size property to the Options group, set this property to User specified, and specify a value for the block size.
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/