Multiple Lookup

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
prasad111
Premium Member
Premium Member
Posts: 173
Joined: Fri May 19, 2006 10:53 am

Multiple Lookup

Post by prasad111 »

Hi,

Source file has 4 columns
Src_col1, Src_col2, Src_col3, Src_col4.

Lookup table1 has 3 columns
lkp1_col1, lkp1_col2, lkp1_col3

Lookup table2 has 3 columns
lkp2_col1, lkp2_col2, lkp2_col3

Target file has 4 columns
Tgt_col1, Tgt_col2, Tgt_col3, Tgt_col4

Reject file has 4 columns as coming from the source.

Condition A:If Src_col1 matches with lkp1_col1 then map the lkp1_col2 to Tgt_col2 and rest from the source
Condition B:If Src_col3 matches with lkp2_col2 then map the lkp2_col3 to Tgt_col4 and rest from the source.
Both the lookups are done in the same lookup stage.

If the above condition does not match it should goto the reject link.

Is there any way that if the condition A does not match but condition B matches then populate the data of the condition B in reject link.
Is there any way that if the condition B does not match but condition A matches then populate the data of the condition A in reject link.

using only one lookup stage!!!!!!


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

Post by ray.wurlod »

No. Use two Lookup stages. Run the reject links from them through a Funnel stage to accumulate the rejected rows. Or make the lookup failed rule on the first Lookup stage Continue, and perform the second lookup conditionally on one of the first lookup columns not being NULL.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
prasad111
Premium Member
Premium Member
Posts: 173
Joined: Fri May 19, 2006 10:53 am

Post by prasad111 »

ray.wurlod wrote:No. Use two Lookup stages. Run the reject links from them through a Funnel stage to accumulate the rejected rows. Or make the lookup failed rule on the first Lookup stage Continue, and perform the ...
Currently I am using two lookup stages. First lookup then reject into a funnel and then second lookup then reject into a funnel and the output.
Post Reply