Regarding Round Robin partition
Posted: Sat Aug 04, 2012 7:57 am
I tried to generate unique number (in sequence) without any breakings between them So I have applied the following formula in a transformer where only this operation is happening.
Formula : @INROWNUM * @NUMPARTITIONS + @PARTITIONNUM - @NUMPARTITIONS - 1
And also making the input partition to the transformer is Round Robin.Datastage is running on forur node config.
But I'm getting some breakings towards the end of of the sequence. Let say if the sequence starts from 1 and ends at 30 then upto 25 it generates properly and after that it generates 27 like that.
When I tried to print the @PARTITION NUM of each record in the dataset it shows the round robin partitioning is not working properly.
Let assume for 27 no of records
Partition 0 : 8 records
Partition 1 : 8 records
Partition 2 : 6 records
Partition 3 : 5 records
And this is happenings when the input to the transformer is round robin partitioned.
But as per round robin method the records should be distributed in the following way.
Partition 0 : 7 records
Partition 1 : 7 records
Partition 2 : 7 records
Partition 3 : 6 records
Formula : @INROWNUM * @NUMPARTITIONS + @PARTITIONNUM - @NUMPARTITIONS - 1
And also making the input partition to the transformer is Round Robin.Datastage is running on forur node config.
But I'm getting some breakings towards the end of of the sequence. Let say if the sequence starts from 1 and ends at 30 then upto 25 it generates properly and after that it generates 27 like that.
When I tried to print the @PARTITION NUM of each record in the dataset it shows the round robin partitioning is not working properly.
Let assume for 27 no of records
Partition 0 : 8 records
Partition 1 : 8 records
Partition 2 : 6 records
Partition 3 : 5 records
And this is happenings when the input to the transformer is round robin partitioned.
But as per round robin method the records should be distributed in the following way.
Partition 0 : 7 records
Partition 1 : 7 records
Partition 2 : 7 records
Partition 3 : 6 records