regarding utility hashlookup

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
vijaykumar
Participant
Posts: 228
Joined: Tue Oct 03, 2006 7:08 pm

regarding utility hashlookup

Post by vijaykumar »

Hi Gurus,
I read that utilityhashlookup does lookup operation against a hashtable.

my design is odbc------>hashed file.

used another odbc source and want to join with hashed file.

i want to make use of utility hashlookup which does lookup against a hashtable.

from where i should call this utility, so that it does lookup against the table stored in my hashed file.

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

Post by ray.wurlod »

In the Transformer stage that you have not yet included in your design.

However, it would be far more efficient to use a second Hashed File stage in the job design, and use the Transformer stage to perform the lookup against it. In this way, you do not incur the overhead of the routine, and possibly gain the benefit of the hashed file read cache.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vijaykumar
Participant
Posts: 228
Joined: Tue Oct 03, 2006 7:08 pm

Post by vijaykumar »

hi gurus,

i need to make use of utilityhashlookup, i never used this utility.
i have seen from previous forums that it does lookup against hashtable.
i have dumped table for ex: employee in hashedfile.
from where i should call this utility.
i never used this utility, i want to make use of this utility and analyze how it works.
plz gurus i would appreciate if anyone help me in analyzing this utility.

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

Post by ray.wurlod »

vijaykumar wrote:i need to make use of utilityhashlookup
You don't. It's the wrong answer to your requirement.

Source code is provided in the repository; examine it if you want to understand what it does and how it works.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Saama
Premium Member
Premium Member
Posts: 83
Joined: Wed Nov 22, 2006 6:42 pm
Location: Pune
Contact:

Post by Saama »

hi gurus,
in the transformer properties , i got tabs only to specify before sub-routine or after sub-routine, how should i call utilityhashlookup.
plz help me gurus in analyzing.

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

Post by ray.wurlod »

It's a transform function and therefore can not be invoked as a before/after subroutine.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vijaykumar
Participant
Posts: 228
Joined: Tue Oct 03, 2006 7:08 pm

Post by vijaykumar »

HI GURUS,
my design is hashfile---->ODBC
combining hashfile with ODBC with transformer stage.
i want to make use of utilityhashlookup.
iam defining the properties at column deptno.

deptno-->doubleclick--->browse for functions and i specify the expression as UtilityHashLookup('SCOTT.DEPT', DEPTNO, DSLink15.DEPTNO).
i cannot validate my expression.

my keycolumn is deptno

my name of hashtable--->scott.deptno

i couldn't understand the term- position to be retained.plz help me in validating the expression and also in analyzing the utility.

cheers;
vijay
us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Post by us1aslam1us »

Check this post, Ken had given a beautiful explanation. Search is a best approach for all your questions.

viewtopic.php?t=101154&highlight=utilityhashlookup

Sam
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Pay close attention to Ray's comment. Just because you have it, does'nt mean you 'have to have to' use it. Just source the odbc, do a lookup on the hashed file using the conventional design via transformer
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply