logic on group number
Posted: Wed Sep 15, 2010 2:56 pm
Hello
I have a requirement where i need to read the data from seq file and write it to a seq file. i am using transformer and running the transformer sequentially.
I am using a job parameter called group number. If the group number is 4 then i need to create additional column called group number and assin the values as below.
lets say i am extracting 10 rows from input file (a,b,c,d....). The out out should be
Col1 GroupNbr
a 1
b 1
c 1
d 1
e 2
f 2
g 2
h 2
i 3
j 3
and so on.
Need help on how to get this grp numbers. This group number parametr i am passing as a job parameter and this can be any number.
Regards
I have a requirement where i need to read the data from seq file and write it to a seq file. i am using transformer and running the transformer sequentially.
I am using a job parameter called group number. If the group number is 4 then i need to create additional column called group number and assin the values as below.
lets say i am extracting 10 rows from input file (a,b,c,d....). The out out should be
Col1 GroupNbr
a 1
b 1
c 1
d 1
e 2
f 2
g 2
h 2
i 3
j 3
and so on.
Need help on how to get this grp numbers. This group number parametr i am passing as a job parameter and this can be any number.
Regards