Hashfile 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
cosec
Premium Member
Premium Member
Posts: 230
Joined: Tue May 08, 2007 8:10 pm

Hashfile Lookup

Post by cosec »

Is it possible to do a lookup on a hashfile to retrieve records between certain dates.....I am able to do what I want using a DB2 stage....but using a hashfile I cannot select the particular records I want......I used the account name option but it disables the selection when I use it as a lookup..... any suggestions ?
hamzaqk
Participant
Posts: 249
Joined: Tue Apr 17, 2007 5:50 am
Location: islamabad

Post by hamzaqk »

use the universe stage if you want to do a range match .. hashfile does an exact match ..
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Hashed file lookups do not support a BETWEEN type of lookup. You can use the SQL query on a hashed file (ODBC or UniVerse stages), but the performance is going to be abyssmal (full table scan for each row). There are a number of solutions for better performance to this type of problem that have been covered before in this forum.
cosec
Premium Member
Premium Member
Posts: 230
Joined: Tue May 08, 2007 8:10 pm

Post by cosec »

does that mean I am better off using my filtered DB2 stage as the lookup to do the same function ?
ArndW wrote:Hashed file lookups do not support a BETWEEN type of lookup. You can use the SQL query on a hashed file (ODBC or UniVerse stages), but the performance is going to be abyssmal (full table scan for each ...
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

That is hard to say, as it depends on your implementation. In some cases it is better to create hashed lookup files for this and changing the lookup from a range to a simple unique keyed one [at the cost of making the data volume much larger]
Post Reply