Range Lookup for the multiple reference dataset

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
suja.somu
Participant
Posts: 79
Joined: Thu Feb 07, 2013 10:51 pm

Range Lookup for the multiple reference dataset

Post by suja.somu »

I have requirement where the source needs to be looked upon 3 reference datasets to get the related value.

Conditions :

dataset1:
source_col1=dataset1_colA
source_date1>= date_A and
source_date1<= date_B

dataset2:
source_col2=dataset2_colb
source_date1>= date_D and
source_date1<= date_E

dataset3:
source_col3=dataset3_colC
source_date2>= date_A and
source_date2<= date_B


I tried using the range lookup with a single lookup stage for all of the three reference dataset.
I could not set the range columns properly for the dataset1 and dataset2 as they reference the same source column(source_date1).

So for this scenario I used 3 lookup stages each for the dataset. Am I missing anything here? or is this the correct approach ?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Using three Lookup stages is the correct approach, not least because it works.

When you use a range lookup the Lookup stage compiles to a transform operator and, as you noticed, gets finicky about what's able to be used (re-used) as a lookup key.
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