Page 1 of 1

surrogate key issue

Posted: Wed Dec 29, 2010 1:03 am
by Kumar@1988
Hi,

I have a problem with surrrogate key,ds 8.x.
In surrogate key stage, i want to reset the key value after reaching the particular value(For example ending value 10000) then it will start from begining(for ex 1 2 3 4 ..........10000 ,1 2 3 ........10000).


plz provide the solution

Thanks
Ravi

Re: surrogate key issue

Posted: Wed Dec 29, 2010 1:08 am
by manoj_23sakthi
Hi,
Instead of using this Surrogate key use row generator and give
Intial value = 1
Final value = 10000
Increment value =1
It will Satisfy your Requirement


Regards,
Manoj

Posted: Wed Dec 29, 2010 3:52 pm
by ray.wurlod
A surrogate key provides uniqueness. What you are requiring is not uniqueness. Therefore the Surrogate Key Generator stage is not the right stage to use. The approach suggested by Manoj will get you close, though generating the 10000 values in parallel on each node. A better solution will involve an expression that refers to the partition number and the number of partitions.

Re: surrogate key issue

Posted: Sun Jan 02, 2011 1:52 am
by Kumar@1988
Hi Manoj,

Thak u for sagition but i useing coloumn generator stage i have faced a problem that is if i given limit value is 1000 then it will come only 762 after it will come from first onwards supose if given limit value 2000 then it will come only 1762 after it will come first onwards can u give any sagition

Re: surrogate key issue

Posted: Mon Jan 03, 2011 1:37 am
by manoj_23sakthi
Hi Kumar,
I think in setting you may did some mistakes reset and try this
Thanks,
Manoj