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
dodda
Premium Member
Posts: 244 Joined: Tue May 29, 2007 11:31 am
Post
by dodda » Mon Apr 06, 2009 12:04 pm
Hi All,
I have data like this,
Soucre file has (seq file)
col1 col2
1 NAP
Lookup data from database (oracle stage0
col1 col2
1 AB
1 CD
1 EF
2 HJ
I want to retrieve multiple rows from lookup data My final target data file should like as below
col1 col2 col3
1 NAP AB
1 NAP CD
1 NAP EF
Please help
Thanks
girija
Participant
Posts: 89 Joined: Fri Mar 24, 2006 1:51 pm
Location: Hartford
Post
by girija » Mon Apr 06, 2009 12:08 pm
Select "Multiple rows returned from link".
dodda
Premium Member
Posts: 244 Joined: Tue May 29, 2007 11:31 am
Post
by dodda » Mon Apr 06, 2009 12:13 pm
Hello
Thanks for your reply.
Where should i select multiple rows returned from the link
Thanks
dodda
Premium Member
Posts: 244 Joined: Tue May 29, 2007 11:31 am
Post
by dodda » Mon Apr 06, 2009 12:20 pm
Sorry i gave the wrong requirement. I need the output format to be
1 NAP AB CD EF
Regards
girija
Participant
Posts: 89 Joined: Fri Mar 24, 2006 1:51 pm
Location: Hartford
Post
by girija » Mon Apr 06, 2009 12:22 pm
lookup stage --> link tab
dodda
Premium Member
Posts: 244 Joined: Tue May 29, 2007 11:31 am
Post
by dodda » Mon Apr 06, 2009 12:27 pm
i did not see any thing like select multiple rows
dodda
Premium Member
Posts: 244 Joined: Tue May 29, 2007 11:31 am
Post
by dodda » Mon Apr 06, 2009 12:28 pm
i did not see any thing like select multiple rows
girija
Participant
Posts: 89 Joined: Fri Mar 24, 2006 1:51 pm
Location: Hartford
Post
by girija » Mon Apr 06, 2009 12:31 pm
1. Double click in your lookup stage.
2. Click on "Constraints" button (Second left from top-left corner)
3. Select your link from the list of "Multiple rows returned from link"
keshav0307
Premium Member
Posts: 783 Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia
Post
by keshav0307 » Mon Apr 06, 2009 11:18 pm
get all multiple rows from the reference, then use a sort stage to sort the data on first two column (1 NAP) and then in a transformer stage, concatnate for all column3 values for same key (1 NAP)