Hi Guys,
I believe lot of people have faced this problem. I have source in flat file. I need to lookup to a flat file which has ranges .
eg: source column, number
Lookup file, low_num,high_num, groupid
I have to lookup to this file and if my source number falls in one of the groups I need to get the groupid in the output.
Any suggestions are appreciated.
-Somu
Conditional Lookup
Moderators: chulett, rschirm, roy
Conditional Lookup
somaraju
Oh, I think that now I understand your requirement. I believe that there is no Conditional Lookup stage (you need parallel Lookup stage for that).
If you only have two or three groups you can just create a derivation in a transformer stage like "If ID > Low then "group1" else "group2"". If you need something more complex you can serch "Conditional Lookup" in this forum.
God luck
If you only have two or three groups you can just create a derivation in a transformer stage like "If ID > Low then "group1" else "group2"". If you need something more complex you can serch "Conditional Lookup" in this forum.
God luck
Craig is correct. You need to build the hash file with some arbitrary key. You need to use a UV stage unless you can find and build multivalues. Save your metadata from the hash file load. Leave the hash file in the account (no path and no account name) unless you want to figure out SETFILE.
Next using the UV stage as an lookup, load the metadata saved from the hash file. Change the key to be the 2 fields you want to lookup. Change the SQL to user defined. Change the SQL to be a between join.
Please no private messages.
Next using the UV stage as an lookup, load the metadata saved from the hash file. Change the key to be the 2 fields you want to lookup. Change the SQL to user defined. Change the SQL to be a between join.
Please no private messages.
Last edited by kduke on Wed Dec 21, 2005 8:28 am, edited 1 time in total.
Mamu Kim