Understanding Row Numbering algorithm
Posted: Fri Dec 05, 2014 7:49 pm
I am posting in this thread because it totally relates to the original poster's topic.
I am using auto partitioning. The logic I have is:
InitialValue for stage variable svOne:
@PARTITIONNUM-(@NUMPARTITIONS-1)
svOne derivation: svOne + @NUMPARTITIONS
svOutputRow=svOne
This works perfectly every time no matter how many nodes I have in the config file. I tried with files of over 10000 rows and it works fine as well.
My problem is, I am not sure I understand the logic. I tried to use peek stage to get system variable values out. For example, for svOutputRow of 14, I have these values: NUMPARTITIONS=4, PARTITIONNUM=1, InitialValue of svOne: -2
The final value should be: -2 + 4 = 2 unless InitialValue is being calculated only once per node and only "svOne + @NUMPARTITIONS" is being executed in which case the values would come out right.
Any thoughts?
I am using auto partitioning. The logic I have is:
InitialValue for stage variable svOne:
@PARTITIONNUM-(@NUMPARTITIONS-1)
svOne derivation: svOne + @NUMPARTITIONS
svOutputRow=svOne
This works perfectly every time no matter how many nodes I have in the config file. I tried with files of over 10000 rows and it works fine as well.
My problem is, I am not sure I understand the logic. I tried to use peek stage to get system variable values out. For example, for svOutputRow of 14, I have these values: NUMPARTITIONS=4, PARTITIONNUM=1, InitialValue of svOne: -2
The final value should be: -2 + 4 = 2 unless InitialValue is being calculated only once per node and only "svOne + @NUMPARTITIONS" is being executed in which case the values would come out right.
Any thoughts?