Page 1 of 1

Range Lookup for the multiple reference dataset

Posted: Tue Mar 19, 2013 9:23 am
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 ?

Posted: Tue Mar 19, 2013 1:26 pm
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.