join two keys with lookup stage

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
vinsashi
Participant
Posts: 150
Joined: Mon Aug 20, 2007 4:52 am
Location: singapore

join two keys with lookup stage

Post by vinsashi »

Hi,
i have two fileds in source f1,f2 and in reerence data i have r1,r2 column.
first i should lookup f1 and r1 then for matchinf records i should pass r2 .for unmatching records i should lookup f2 with r1 then i should pass r2 for those records.is this one how can i do with singale lookup stage.

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

Post by ray.wurlod »

Don't do it. Use two Lookup stages. It's cleaner.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vinsashi
Participant
Posts: 150
Joined: Mon Aug 20, 2007 4:52 am
Location: singapore

Post by vinsashi »

will it possible.if itpossible how to do what are the options i should mention
meet_deb85
Premium Member
Premium Member
Posts: 132
Joined: Tue Sep 04, 2007 11:38 am
Location: NOIDA

Post by meet_deb85 »

I don't think there is any way of doing it using 1 lookup stage
manoj_23sakthi
Participant
Posts: 47
Joined: Tue Feb 23, 2010 12:16 am
Location: CHENNAI

Post by manoj_23sakthi »

i am not sure abt this...
in constrain we can do this...
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Lookup stages don't have constraints.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
manoj_23sakthi
Participant
Posts: 47
Joined: Tue Feb 23, 2010 12:16 am
Location: CHENNAI

Post by manoj_23sakthi »

hi ray,

In look up property we can give condition
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You can give a condition about whether or not to attempt the lookup, but you can not make the lookup itself conditional which is what your original post suggests. Perform the lookup with a Lookup stage unconditionally, and handle the condition elsewhere - maybe only load the records into the reference data set that meet the condition, maybe test the condition downstream of the Lookup stage in a Filter, Switch or Transformer stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply