Clarification on Range Lookups
Posted: Mon Sep 22, 2008 9:30 am
Hi ,
I used the look up stage with lookup type as Range in 8.x and have the following issue .
Layouts
Source File :Keys.txt
Contents :
Value
1
102
Reference File : Key_range.txt
Contents :
startvalue, endvalue, description
1 , 100 , A
101 ,200 ,B
Expected Output :
Contents :
Value,Description
1,A
2,B
Issue Description :
i) When I had the source,refernece and target columns defined as varchar the range look up did not work,all the records went to the reject link. But when I changed the dataype to Integer for the columns , Value (Source File ), Start & End value ( reference file) I had a hit and got the desired output .
ii) I decided to swap the source and the reference but kept the datatypes as varchar . So my new job had the following as source and reference files :
Source File : Key_range.txt
Reference File : Keys.txt
Now the look up worked and I got the expected result .
Does it mean that we cannot have integer datatype when the range is done on stream link ( i.e. when the source file is like keys.txt)
Thanks,
Vinod
I used the look up stage with lookup type as Range in 8.x and have the following issue .
Layouts
Source File :Keys.txt
Contents :
Value
1
102
Reference File : Key_range.txt
Contents :
startvalue, endvalue, description
1 , 100 , A
101 ,200 ,B
Expected Output :
Contents :
Value,Description
1,A
2,B
Issue Description :
i) When I had the source,refernece and target columns defined as varchar the range look up did not work,all the records went to the reject link. But when I changed the dataype to Integer for the columns , Value (Source File ), Start & End value ( reference file) I had a hit and got the desired output .
ii) I decided to swap the source and the reference but kept the datatypes as varchar . So my new job had the following as source and reference files :
Source File : Key_range.txt
Reference File : Keys.txt
Now the look up worked and I got the expected result .
Does it mean that we cannot have integer datatype when the range is done on stream link ( i.e. when the source file is like keys.txt)
Thanks,
Vinod