Page 1 of 1

multiple row from lookup

Posted: Mon Apr 06, 2009 12:04 pm
by dodda
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

Posted: Mon Apr 06, 2009 12:08 pm
by girija
Select "Multiple rows returned from link".

Posted: Mon Apr 06, 2009 12:13 pm
by dodda
Hello

Thanks for your reply.

Where should i select multiple rows returned from the link

Thanks

Posted: Mon Apr 06, 2009 12:20 pm
by dodda
Sorry i gave the wrong requirement. I need the output format to be

1 NAP AB CD EF

Regards

Posted: Mon Apr 06, 2009 12:22 pm
by girija
lookup stage --> link tab

Posted: Mon Apr 06, 2009 12:27 pm
by dodda
i did not see any thing like select multiple rows

Posted: Mon Apr 06, 2009 12:28 pm
by dodda
i did not see any thing like select multiple rows

Posted: Mon Apr 06, 2009 12:31 pm
by girija
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"

Posted: Mon Apr 06, 2009 11:18 pm
by keshav0307
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)