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 need a solution for one of my requirement, which is as follows:

1. I have a Look up table In which I have column named as "Profit Center".

2. I have a reference table in which I have two columns "Valfrom" and "Valto"
3. I need to specify a condition in Lookup stage as
"profit Center">="valfrom" and "profit Center"<="valto".

Please suggest me how do I do this?

Regards
Prasanna lakshmi
Maveric
Participant
Posts: 388
Joined: Tue Mar 13, 2007 1:28 am

Post by Maveric »

Dont think you can get reference link columns in the constraints in the lookup. You will have to use a filter stage after the lookup.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

If you are using DB2 or Oracle Enterprise stage to feed to reference input link then you could use this SQL.

Otherwise use a Join stage, or upgrade to version 8 in which the ability to perform range lookups is in the Lookup stage. Vincent has created a recent blog on the latter.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
mspanda
Participant
Posts: 32
Joined: Tue May 09, 2006 6:22 am
Location: bangalore

Post by mspanda »

Is there any other way to achieve tat reference link column in Constraint.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Of course.

You could write your own stage (a Build stage).
You could write a parallel routine, and invoke it from a Transformer stage.

Just to name two.
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