Lookup With Duplicate Records

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
devidotcom
Participant
Posts: 247
Joined: Thu Apr 27, 2006 6:38 am
Location: Hyderabad

Lookup With Duplicate Records

Post by devidotcom »

Hi All,

I have scenario wherein i have to perform lookup with one table one multiple conditions.

For example:
Source Table ====> A
Lookup Table ====> B
Perform lookup on the table based on B.Col3 = 'CC' and A.Col1=B.Col1 to and fetch B.Col2.
Similarly, next condition is on Col3 = 'FF' and A.Col1=B.Col1 to and fetch B.Col4.


I designed this job to have a filter after i read the lookup table and filtered based on the condition Col3 and then used the Col1 to perform lookup with the source. Hence had two reference links from the filter stage to the lookup stage.

In a similar way i have multiple such conditions and hence multiple reference links. I job fails due to the following error message as I might end up getting multiple duplicates records from each of these links.

lkp_PSA_Tbl,0: Multiple lookup tables allow duplicate entries: 4 (/da915m00/IBM/InformationSerer/Server/Projects/ERP_US/DS_TEMP/dynLUT8790f13e691b) and 6 (/da915m00/IBM/InformationSerer/Server/Projects/ERP_US/DS_TEMP/dynLUT8790743d4582)

How do I design this apart from splits them into individual lookup stage.
Appreciate your help.

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

Post by ray.wurlod »

You don't. Each Lookup stage allows only one reference input to deliver multiple rows - that's why you choose the link name from a drop down list.

Multiple inputs delivering multiple rows is getting you into Cartesian product territory - you can end up generating very many rows on the output.
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