Condition in 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
mspanda
Participant
Posts: 32
Joined: Tue May 09, 2006 6:22 am
Location: bangalore

Condition in Lookup Stage

Post by mspanda »

Hi,

I have an issue in the lookup stage. In Lookup table I have column1 and in reference table I have column2,column3 and column4. I need to specify a condition in lookupstage that column1 lies in between Column2 and column3 then retrieve column4 from reference table into the target.

How do I specify that kind of criteria in Lookup Stage?

Regards
Prasanna
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

That type of a range lookup will only work on Database objects. You need to use a sparse lookup and user-defined SQL in order to specify your BETWEEN condition.
devidotcom
Participant
Posts: 247
Joined: Thu Apr 27, 2006 6:38 am
Location: Hyderabad

Post by devidotcom »

Hi Prasanna,

If the amount of data in the input link is more when compared to reference table than this would be a good option to use a sparse lookup.
That is 1:10000 ratio between reference link:input link

Else you would have to use a transformer stage or a filter stage after lookup stage to check column1 lies in between Column2 and column3 and then fetch the column 4.

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

Post by ray.wurlod »

Upgrade to version 8.0. Then you get range lookups.
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