Page 1 of 1

seq number

Posted: Tue Apr 21, 2009 7:39 pm
by rmeenakumari822
Hi ,

Can any one give suggestion.....

i have a source like

name address
anil ADD1
priya ADD1
sunil ADD1
anil ADD2
sunil ADD2
anil ADD3
......


i need the target like

name value address
anil 01 ADD1
anil 02 ADD2
anil 03 ADD3
sunil 01 ADD1
sunil 02 ADD2
priya 01 ADD1
......

Thanks,

Posted: Tue Apr 21, 2009 8:02 pm
by Kryt0n
Best guess given information...

Sort input on name, use stage variables to determine change of name and increment a second stage variable when names are the same, reset when different...

Posted: Wed Apr 22, 2009 2:25 am
by ray.wurlod
Even easier, sort with a Sort stage and generate a Key Change column in that to detect change of value. Then do the stage variables thing in a downstream Transformer stage.