Page 1 of 1

Decoding value in transformer

Posted: Thu Jan 08, 2009 2:21 am
by suresh.narasimha
Hi All

I have a scenario here

Input :

Col 1, Col 2, Col 3
=============
1, abc, 123
1, abc, 123
1, abc, 456
2, def, 111
2, def, 112

Output :

Col 1, Col 2, Col 3
=============
1, abc, 1
1, abc, 2
1, abc, 3
2, def, 1
2, def, 2

Can please suggest how can I do this using stage variables ?

my source and targets are flat files.

Thanks in advance
Suresh

Re: Decoding value in transformer

Posted: Thu Jan 08, 2009 2:54 am
by dwh.com
suresh.narasimha wrote:Hi All

I have a scenario here

Input :

Col 1, Col 2, Col 3
=============
1, abc, 123
1, abc, 123
1, abc, 456
2, def, 111
2, def, 112

Output :

Col 1, Col 2, Col 3
=============
1, abc, 1
1, abc, 2
1, abc, 3
2, def, 1
2, def, 2

Can please suggest how can I do this using stage variables ?

my source and targets are flat files.

Thanks in advance
Suresh

fren u have rowcompare previous routine..that will help u to get this kinda result...

Posted: Thu Jan 08, 2009 2:55 am
by ray.wurlod
Did you Search? How to use stage variables to "remember" values from the previous row has been discussed a bajillion times, I am sure that at least some of those deal with running counts.