Lookup Issue

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
Praful
Participant
Posts: 14
Joined: Fri Apr 12, 2013 10:29 pm
Location: United States

Lookup Issue

Post by Praful »

I am facing the issue with lookup . I am doing lookup on dataset with other dataset matching three key values. If any one of the three keys are matched then the data will be processed to next level else goes into reject file. The issue is for some values even I gets the match with key value then also they are going into reject file. The partitioning on lookup is entire for all three links and partition on input dataset is hash. There are no conditions used.

Below is the job design,

Dataset -->Join-->Filter-->Lookup-->dataset

Let me know how to resolve the issue if anyone has faced this kind of problem. Thank you.
Regards,
Praful
srinivas.g
Participant
Posts: 251
Joined: Mon Jun 09, 2008 5:52 am

Post by srinivas.g »

Use lookup condition like ((main.key1=ref.key1) or (main.key2=ref.key2) or (main.key3=ref.key3))....
Srinu Gadipudi
prasson_ibm
Premium Member
Premium Member
Posts: 536
Joined: Thu Oct 11, 2007 1:48 am
Location: Bangalore

Post by prasson_ibm »

You have three reference links in lookup or you have one ref. Link with three key columns to join between input link and reference link.

I assume second situation, if this is the case,check the input and ref kry colums datatypes, it should be same.
Praful
Participant
Posts: 14
Joined: Fri Apr 12, 2013 10:29 pm
Location: United States

Post by Praful »

I checked the datatypes which is exactly same VARCHAR 255.

Input dataset (main link) have three columns (A,B,C)
Reference dataset contains one column (X).
Using copy stage splitting reference column into three links and matching with input 3 columns.

Currently there is no lookup condition. If we add below condition then it will work or not?

((main.key1=ref.key1) or (main.key2=ref.key2) or (main.key3=ref.key3))

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

Post by ray.wurlod »

You can't make those conditions on the lookup since you don't have the ref keys when that decision has to be made. You can, however, construct such a test once all the lookups have been attempted.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Praful
Participant
Posts: 14
Joined: Fri Apr 12, 2013 10:29 pm
Location: United States

Post by Praful »

Some records are going into reject file even if values are match with key value in Lookup stage. How should I get the rejected records into output link. Can you please give some more input which test you want me to perform after lookups completed.
Regards,
Praful
prasson_ibm
Premium Member
Premium Member
Posts: 536
Joined: Thu Oct 11, 2007 1:48 am
Location: Bangalore

Post by prasson_ibm »

Try to test with three different lookups for three joins.
crystal_pup
Participant
Posts: 62
Joined: Thu Feb 08, 2007 6:01 am
Location: Pune

Post by crystal_pup »

Hi Praful

For the values that have a match but still are going into the reject link, try trimming the data in both the links ( input and reference ).

We faced same scenario wherein both the key columns had matching data type as well as length, still the records were getting rejected.We trimmed the data on the key columns and it worked.

Cheers
KD
Post Reply