Hash File Sort

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
SPA_BI
Premium Member
Premium Member
Posts: 36
Joined: Tue Aug 29, 2006 8:01 pm
Location: Melbourne

Hash File Sort

Post by SPA_BI »

Hi,

I have noticed records are not stored in a sorted order in a hash file.

Is it possible to have the records sorted... or at least maintain ordering inside the hash file?

thanks,

SPA_BI
from SPA_BI
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

Here is a nice link

I guess you have to post this in the server forum :roll:
Last edited by narasimha on Tue Nov 28, 2006 12:01 am, edited 1 time in total.
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
rachitha
Participant
Posts: 30
Joined: Wed Jun 28, 2006 10:53 am

hi

Post by rachitha »

Hi

We cannot do any sort operation in hash files only way is to use sort stage.If your src in ODBC stage then add ORDER by in your query.But you can apply any filter conditions in Hash file Stage: output->selection "here you can specify filter condition".

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

Post by ray.wurlod »

It is not possible to prescribe storage order in a hashed file, for exactly the same reasons it is not possible to do so in a database table. The database controls where records are stored. In the case of hashed files, it's the hashing algorithm.

You can sort upon retrieval either by retreiving with an ORDER BY clause in a UniVerse stage, or with a BY clause in a Hashed File stage (on the Selection tab).

Of course, hashed files are principally used for key-based lookups, so the issue of sorting is moot.
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