Page 1 of 1

look up failures

Posted: Fri Apr 16, 2010 3:16 am
by arnie_nits
Hi,

I am getting a very strange problem. All my source records are failing lookups. But when I try to fine the records in the lookup hash files they are present.
What might be the reason. Please help.

Regards,
Arnab.

Posted: Fri Apr 16, 2010 3:25 am
by ArndW
Do you have a single key column or multiple keys? Please give one example of a key that fails. Note that keys "HELLO" and "HELLO " might look the same but are distinct.

Posted: Fri Apr 16, 2010 3:44 am
by arnie_nits
2 keys columns...
customerid and country
customerid=3*3BARS*COKS
country=USA


I tried with only customerid ,even then it was failing.

I also tried with ereplace(customerid,'*',''),even that failed.

Regards,
Arnie.

Posted: Fri Apr 16, 2010 3:50 am
by ArndW
How did you create the hashed file - unless you created it within DataStage and used the same key columns in the same order your lookup will most likely not work.

Posted: Fri Apr 16, 2010 4:15 am
by arnie_nits
Yes...I created the hash file.....it is reusable job...only this time it is failing....with new set of data......

Posted: Fri Apr 16, 2010 6:37 am
by ArndW
HOW did you create the hashed file? Can you go to the admin tool or UVSH and do a "LIST DICT {HashedFileName}"

Posted: Fri Apr 16, 2010 7:04 am
by chulett
99 times out of 99 it's because of untrimmed character data on one side of the lookup or the other. As Arnd noted with his "HELLO" example. Ensure the metadata when created and used matches exactly.

Posted: Mon Apr 19, 2010 3:18 am
by ArndW
In this case I think it is the multiple columns used for the key that is causing the issue, particularly if the file creation metadata and query metadata are not the same. But generally it is as Craig has stated, that unseen spaces cause fields that look the same to not match.