Page 1 of 1

Concatination

Posted: Tue Dec 07, 2010 4:38 pm
by moulicherukuri
Hi Guys
I need an Idea to implement the following logic
Can any one suggest me

My Src seems like

ID---SEQNO---MSG
100--- 1--- X
200--- 1--- Y
300--- 1--- A
300--- 2--- B
300--- 3--- C
400--- 1--- A
400--- 2--- B

Output should be like
ID---- MSG
100--- X
200--- Y
300--- A||B||C
400--- A||B
Concatination should be done in the SEQNO order.

Posted: Tue Dec 07, 2010 4:57 pm
by abhijitg
Hi,

I would first sort the incoming records on ID and SEQ. I would then create two variables CurrentID and PrevID in your transformer. If the CurrentID=PrevID Then MSG=MSG:in.MSG Else MSG=in.MSG. The PrevID=CurrentID assignment should the last thing you do in the transformer.

Thanks
Abhijit

Posted: Tue Dec 07, 2010 6:43 pm
by ray.wurlod
Use a downstream Remove Duplicates stage to pass only the last in each group.

Or upgrade to version 8.5 where you can do loop processing within the Transformer stage.