Page 1 of 1

Lookup warning-Ignoring duplicate entry at table record

Posted: Sat Oct 24, 2009 7:37 am
by aluthra48
Hello,

I have a following error in one of my jobs:
LKP_DIAGNOSIS_BRIDGE,0: Ignoring duplicate entry at table record 720; no further warnings will be issued for this table

I know what the error means, and can fix it, but the question I have is:

If there are several rows returned from a reference table with the same key value, is the lookup value at least picked up from one of those several rows, while of course ignoring the other rows in the set?

Thanks

Posted: Sat Oct 24, 2009 8:28 am
by ArndW
The warning message means that DataStage detected a duplicate key while building up the lookup table and only stored the first key and it's corresponding data values. When doing the lookup with actual data, only that value is in the table and therefore only that value is returned.

Posted: Sat Oct 24, 2009 10:32 am
by ray.wurlod
Unless, of course, you've selected that reference link as "allow duplicates".

Posted: Mon Oct 26, 2009 6:55 am
by aluthra48
Thanks for the response.

As I mentioned, I know what the message means, and what I need to do to fix it. The question was, in case there are more than one row returned for lookup, as it did here, does DS ignore the lookup value, or it looks up the value from the first available reference row, and ignores the rest of the rows?
Of course, I can set up a simple test to verify.

Posted: Mon Oct 26, 2009 7:43 am
by aluthra48
I just conducted a test. If there are 2 reference rows returned with the same key value, the value of the column looked up is the value from the 1st row returned, and value from the 2nd row is ignored.

Posted: Mon Oct 26, 2009 8:09 am
by chulett
Which is exactly what Arnd told you.

Posted: Mon Mar 29, 2010 9:16 am
by wittyme
Where can we find the allow duplicates in the lookup stage. Sorry I couldn't see that

Posted: Mon Mar 29, 2010 1:29 pm
by ray.wurlod
I assume, because the thread is marked as Resolved, that you found it (a drop-down list on the Constraints page).