Lookup problem

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
hemaarvind1
Participant
Posts: 50
Joined: Mon Jan 21, 2008 9:35 am

Lookup problem

Post by hemaarvind1 »

I am facing the below scenario.

I am having a source table ABC having columns col1,col2 and col3. I am having a lookup table 'ABC_Lookup' having columns col1 ,col2,col1_key and col2_key.

I am performing a lookup for ABC table on 'ABC_Lookup' table on the columns col1 and col2 to retreive the col1_key and col2_key respectively.

Suppose if I have nulls coming in col1 in ABC table and if a lookup is performed on col in 'ABC_Lookup' table, the output is 0 as col1 is defined as number.

however, in this case, the value for col2_key is also loaded as 0.it should ideally be populated with col2_key as the lookup is being performed on col2 in source and lookup tables.


can you please explain why is this happening and the solution for this.

Thank you very much.
nayanpatra
Participant
Posts: 41
Joined: Sat Jun 06, 2009 11:13 pm
Location: Kolkata

Post by nayanpatra »

When you are performing a lookup on 2 columns in the same stage, then the output is true only when both the conditions are met i.e. basically AND logic is being implemented. Only when you find a match for both the columns, the result is a valid one.
Nayan
hemaarvind1
Participant
Posts: 50
Joined: Mon Jan 21, 2008 9:35 am

Post by hemaarvind1 »

Thank you very much for your quick reply. This resolved my issue..
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Look them up separately.
-craig

"You can never have too many knives" -- Logan Nine Fingers
hemaarvind1
Participant
Posts: 50
Joined: Mon Jan 21, 2008 9:35 am

Post by hemaarvind1 »

Thank you very much for your quick reply. This resolved my issue..
Post Reply