Range Lookup

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
yiminghu
Participant
Posts: 91
Joined: Fri Nov 14, 2003 10:09 am

Range Lookup

Post by yiminghu »

Hi,

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 ?

Thanks,

Yiming
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

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.
Mamu Kim
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

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.
yiminghu
Participant
Posts: 91
Joined: Fri Nov 14, 2003 10:09 am

Post by yiminghu »

Hi,

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?

Can you shed some lights?

Thanks,

Carol
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

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.
Mamu Kim
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Use the pre-configured localuv data source.

User ID and password will be disabled, as you're already logged in to that data source.
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