Multirow Hash File 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
sohasaid
Premium Member
Premium Member
Posts: 115
Joined: Tue May 20, 2008 3:02 am
Location: Cairo, Egypt

Multirow Hash File Lookup

Post by sohasaid »

Dears,

I want to retrieve multi-rows from a hash file to be used as reference to lookup transformer. Reference link have retrieved multi-rows when using ODBC stage with a direct reference but I need to hash data first before lookup.

I found the following reply by 'Ray' while searching:
viewtopic.php?t=88934
ray.wurlod wrote:How you create multi-valued columns depends on how you create the hashed file.
If you're using a Hashed File or UV stage to create the hashed file, specify M in the Type column in the Columns grid.
I've tried to set 'M' in the Type column for key columns as suggested but it still didn't work.

Regards.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You can not do it with a Hashed File stage. You can, however, do it with a UniVerse stage that references the hashed file through a VOC pointer.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

The 'M' didn't work how? Making something 'multi-value' has absolutely nothing to do with a multi-row result set, by the way, so I guess that makes my question rhetorical.

As noted in many other posts here, you would need to build the hashed file with X fields as the "key" and then use "less than X" in the lookup when you create the VOC pointer over the hashed file and then reference it using a UV stage. Keeping the keys the same would result in still having a singleton lookup. And don't forget the CREATE.INDEX and BUILD.INDEX steps! Without that, it will be slow as, well... mole asses. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Murali4u
Participant
Posts: 37
Joined: Sun Feb 21, 2010 12:27 pm

Post by Murali4u »

It can be done through the standard utility routine 'UtilityHashLookup' under sdk option.
Rockzz Tech
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Sorry, but no it cannot.
-craig

"You can never have too many knives" -- Logan Nine Fingers
arunkumarmm
Participant
Posts: 246
Joined: Mon Jun 30, 2008 3:22 am
Location: New York
Contact:

Re: Multirow Hash File Lookup

Post by arunkumarmm »

Read your Hashed File in a UV stage and look it up... Multi-row lookup will not be enabled for a HF lookup..
Arun
Post Reply