I have a question regarding Range Lookup. I have an input file which has a field called salary, I need to reference a table to find salary range key based on salary figure. The salary range table contains salary_range_key, min_salary, max_salary. Is it possilbe to use hash file to implment this change ?
You have to switch it to a UV stage instead of a hash file stage. Pick the columns you want the range on as key fields then switch to a user defined query and make it a between instead of a exact match.
Yes, you lie to DataStage about which columns are "key" (arguably you ARE using them as secondary keys).
For performance, it is valuable to create an index on each such column.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Thanks for the answer. Now I'm having question about how to setup UV stage, according to help manual, the data source name should be set up in uvodbc.config file. How to setup in the file? How to link my hash with this data source name?
It should come setup. A UV stage is using a hash file within Universe only it accesses it using SQL and not the normal method. It is a little slower but more flexible.