Sequence Generator

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
bi_fujitsu
Premium Member
Premium Member
Posts: 46
Joined: Tue Mar 20, 2007 3:30 am
Location: India

Sequence Generator

Post by bi_fujitsu »

Hi,
I have a field where i want to populate records like 1,2,3,4 etc. I tried using sequence generator but its not populating the records correctly. I have 100 records so the last value that should go into this field is 100 but its populating a value which is more than 100. The configuration file is of 2 nodes. I think the problem is because of this two node file. Can anybody help me in getting the correct value using the same config file.

Thanks
Maveric
Participant
Posts: 388
Joined: Tue Mar 13, 2007 1:28 am

Post by Maveric »

By "sequence generator" do u mean a row generetor? I am assuming it to be row genetator. The row genrator will start the count from initial value and then increment it by the value specified for each node. First check if the colomn you are generating is of integer type. You will have to set the stage property Execution mode to Sequential and also specify the intitial value and increment in Field Properties tab (both 1 in your case).
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Look into surrogate key generator.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
kjosyula
Participant
Posts: 5
Joined: Mon Apr 09, 2007 5:22 pm

Post by kjosyula »

Make the partition/collecting to round robin, You should see the max sequence key generated equals to the no of input rows
-- JK
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

... only if the total number of rows is a whole multiple of the number of partitions.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply