I have an input columns in the following format :
columnA column B
111 ABC is working
123 ZYX is working
111 in Pune
123 in Delhi
I would like my output to be
columnA columnB
111 ABC is working in Pune
123 ZYX is working in Delhi
What kind of stage variables will allow me to accomplish the above transformations ?
Thanks in Advance
How to get mutiple records values into a single record value
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Provided data are partitioned on ColumnA and sorted on ColumnA using a stable sort, then you can use standard stage variables to assemble your required output string. Follow the Transformer stage with a Remove Duplicates that allows only the last row of each group to pass.mohanraj wrote:What kind of stage variables ... ?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You missed his point, column B is freely available without assigning it to a stage variable first.ysrini9 wrote:Stage variable 1 for reading ColumnB.
I tried on the above logic ,It's working fine.
Haven't actually thought about it before but could you have
Code: Select all
s2:if ColumnA<>s4 then ColumnB else s[b]2[/b]:ColumnB
PS, suspect a " " needs to go in there too...