limit the lookup data in a hashed file

Do you have features you'd like to see in future releases of DataStage, MetaStage, Parameter Manager, Version Control or one of the other tools represented on this forum? Post your ideas here!

Moderators: chulett, rschirm

Post Reply
eldonp
Participant
Posts: 47
Joined: Thu Jun 19, 2003 3:49 am

limit the lookup data in a hashed file

Post by eldonp »

there should be some way to limit the lookup data that is written to a hashed file.

e.g.

i extract 100 000 rows from a source (lets assume a subset of the customer base) and need to do a lookup on the latest order from a table in a different system with 10 000 000 rows (lets assume its the orders summary table). It would be beneficial to pass the list of account numbers into the job that creates the hashed file. This means that I only load 100 000 rows into the lookup, not records for each customer!
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Limit in the SQL that extracts data to load in the hashed file.

Code: Select all

SELECT ID, othercols FROM sourcetable T1 WHERE EFF_DATE = (SELECT MAX(EFF_DATE) FROM sourcetable T2 WHERE T1.ID = T2.ID)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
eldonp
Participant
Posts: 47
Joined: Thu Jun 19, 2003 3:49 am

Post by eldonp »

uhhh, the lookup data is sourced from another system - i.e another database. Then the inline sub-query won't work.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Make it work. Load it into a work table in your database so you can do this - a pretty common technique, actually.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

... or even a UV table in DataStage
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