Reusable ODBC Lookups.

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
deepak.shanthamurthy
Participant
Posts: 17
Joined: Tue Apr 11, 2006 2:35 pm

Reusable ODBC Lookups.

Post by deepak.shanthamurthy »

Hi,
Is there any way where i could reuse an odbc lookup other than using it as a hash file.??
Deepak
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Not sure what you mean.

The results from a lookup, no matter what stage type is on the other end of a reference input link, is a row containing either data or nulls. (From an ODBC stage or a UV stage it might be more than one such row.)

Columns from these rows can be directed onto the output of the Transformer stage in the same way as columns from the stream input link and are thus accessible for "re-use" downstream.

If that doesn't answer your question, please post clarification of what you meant.

You might also research the use of shared containers if you are on version 5.2 or later.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
deepak.shanthamurthy
Participant
Posts: 17
Joined: Tue Apr 11, 2006 2:35 pm

Post by deepak.shanthamurthy »

No what i meant to say was that whether i would be able to build a query result set and have it reused to do multiple lookups without having to build the query result set every time i do a lookup.....
Deepak
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

That would be why hashed files have neat things like caching and such. It permanently records a dataset for repeated high-performance reference capabilities.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Ken outlined the advantage of a hashed file.

As to whether ODBC can avoid regenerating the result set, it really depends on the database server, and is not under control of DataStage. The technique used is "prepared SQL", where a query containing parameter markers is sent by DataStage to the database server, which may or may not generate a result set containing every possible key. If it does, then your wish is fulfilled. Most, however, will not but will, instead, rely on an index on the key to provide the required row quickly.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vinaymanchinila
Premium Member
Premium Member
Posts: 353
Joined: Wed Apr 06, 2005 8:45 am

Post by vinaymanchinila »

Can we have multiple reference look ups where lookup1 result can be used in look up2 in the same transformer?


i.e result of look up1 is the key for lookup2

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

Post by ray.wurlod »

Etiquette Note
Do not hijack threads. This thread is nearly 18 months old. Start a new thread where you have a new question. Search the forum first; you question may already have been answered. Further, your question does not relate to the subject of this thread.


Once you have created a new thread your question will be answered in that thread.
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