Page 1 of 1
MULTIPLE ROWS TO SINGLE ROW
Posted: Thu Jan 06, 2011 6:45 am
by ajithaselvan
Hi,
Kindly help me to solve this in parallel job.
Input:
REC_TYPE,REC_COUNT, REC_SUM
C,3,1000
D,5,1500
Output:
REC_TYPE,C_REC_COUNT,C_REC_SUM,D_REC_COUNT,D_REC_SUM
T, 3, 1000, 5,1500
Thanks & Regards
Posted: Thu Jan 06, 2011 7:59 am
by jweir
Use a colon to concatenate the input links.
Re: MULTIPLE ROWS TO SINGLE ROW
Posted: Thu Jan 06, 2011 8:08 am
by sajal.jain
How do you arrive at 'T' in output & and what is criteria to merge... Are sets of 2 rows to be merged into one ?
Re: MULTIPLE ROWS TO SINGLE ROW
Posted: Thu Jan 06, 2011 8:22 am
by ajithaselvan
In the output, REC_TYPE 'T' is the hardcoded value. Yes.2 input rows has to be merged into single row.
Thanks & Regards
Posted: Thu Jan 06, 2011 8:23 am
by ajithaselvan
Thanks jweir.
Can you please more specific?
Thanks & Regards
Posted: Thu Jan 06, 2011 8:29 am
by Ravi.K
Maintain first record at Stage Variable by using @Inrownum.
Sv1--> If @Inrownum=1 Then inputfield1 Else Sv1
Sv2--> If @Inrownum=1 Then inputfield2 Else Sv2
Write the fields to target when @inrownum=2 by deriving all the attributes.