datastage 8.1 - 'loop' through a column with multiple values

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
new2ds2011
Premium Member
Premium Member
Posts: 2
Joined: Fri Jan 21, 2011 10:38 am

datastage 8.1 - 'loop' through a column with multiple values

Post by new2ds2011 »

Datastage 8.1

i have a source table as the following

ID # of email email
---- ----------- ------
1 2 abc@abc.com, bcd@bcd.com
2 3 jfk@jfk.com, a2z@a2z.com, bbb@bbb.com

I need to make each email address a record so the data in the target table will look like this

ID email# email
---- --------- -----------
1 1 abc@abc.com
1 2 bcd@bcd.com
2 1 jfk@jfk.com
2 2 a2z@a2z.com
2 3 bbb@bbb.com


I am new to DataStage, and have been reading the 'Restructure' categories, but haven't figured out yet. Stored procedure stage would be an option, I suppose.

Thanks in advance.
new2ds
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Welcome aboard. That style of looping is available in version 8.5. In earlier versions the easiest approach is to re-parse the comma delimited field into separate fields (perhaps using Column Import stage) then Pivot.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply