can non-key columns looked up?

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
tom
Participant
Posts: 46
Joined: Fri Oct 14, 2005 12:38 am

can non-key columns looked up?

Post by tom »

can non-key columns looked up?Pls give the reason for yes or no
Devlopers corner
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

In server jobs, non-key columns in hashed file cannot be looked up. Nonkey columns in database stage can used for lookups.

The reasons are based on the underlying access methods. When using SQL you can select on non-key columns but the database might have to go and do a full table scan.

Hashed files are only keyed on their {unique} key and the way that hashed file stages are set up does not allow nonkeys to be used for selection criteria. You can always use an ODBC stage to access a hashed file and select on nonkey columns, but don't hold your breath when waiting for queries on large files to come back :)
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You might want to expand a little bit on your question, Tom. :?

Hashed File stage? Database stage? What does the phrase 'non-key columns' mean to you? Sometimes people confuse columns marked as 'key' columns with 'indexed' or 'primary key' columns, but it doesn't mean that at all, hence the question. And by 'looked up' you mean what? In one sense, the 'non key' columns are exactly what you are looking up.
-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 »

The short answer is "yes", except if using a Hashed File stage.

The next question is probably "how?". Think of "Key" in the metadata meaning "search key" rather than "primary key" in this context. Post a specific requirement to get a specific answer.
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