Page 1 of 1

converting multiple rows to single row!!

Posted: Wed May 21, 2008 4:31 am
by G.K.K
hi,

please help in solving this problem....

1.The input file contains the following records,

column1, column2 , column3 , column4
1 , _ , _ , _
_ , 2 , _ , _
_ , _, 3 , _
_ , _ , _ , 4

*here underscore( _ ) indicates null value..

2.The output file must contain all the values of input file in a single row as shown below,

column1, column2 , column3 , column4
1 , 2 , 3 , 4


To achieve this what is the condition that i have to implement in transformer or whether i have write a stage variable?

Thanks in advance and greatful to them ,if any one help me in solving this problem :)

Posted: Wed May 21, 2008 4:40 am
by Cr.Cezon
Hi,

you can use an agregator stage.
if not required values are null, then you can use Max(col)

regards,
Cristina.

Posted: Wed May 21, 2008 7:00 am
by chulett
Always four? Stage variables can solve this rather easily if that's the case.