Hashed File - Key column

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
DEEPTI
Participant
Posts: 9
Joined: Wed Nov 21, 2007 12:19 am

Hashed File - Key column

Post by DEEPTI »

Hi all,

Is it necessary that we have to select the key column in the ouput tab of a hashed file which was defined in the input tab?

Let me say I have three columns in the input tab of a hashed file
A- Key column ,
B
and
C
My problem is when I am not selecting the column A from the input side,
the value of first column in the output tab(whther it is B or C) is becoming equal to the value specified in the column A in the input tab.

Thanks in Advance,
Deepti
swarnkar
Participant
Posts: 74
Joined: Wed Jan 11, 2006 2:22 am

Re: Hashed File - Key column

Post by swarnkar »

It's necessary to have key column to be included in hashed file.

- Nitin
swarnkar
Participant
Posts: 74
Joined: Wed Jan 11, 2006 2:22 am

Re: Hashed File - Key column

Post by swarnkar »

It's necessary to have key column to be included in hashed file.

- Nitin
hemanthakumar
Participant
Posts: 34
Joined: Mon May 05, 2008 1:31 am

Post by hemanthakumar »

Hi,
its not necessary that we have to select the key column in the ouput tab of a hashed file which was defined in the input tab? But It's necessary to have any key column .
Last edited by hemanthakumar on Thu Jan 29, 2009 1:29 am, edited 2 times in total.
hemanthakumar
Participant
Posts: 34
Joined: Mon May 05, 2008 1:31 am

Post by hemanthakumar »

Hi,
its not necessary that we have to select the key column in the ouput tab of a hashed file which was defined in the input tab? But It's necessary to have any key column .
Last edited by hemanthakumar on Thu Jan 29, 2009 1:27 am, edited 1 time in total.
DEEPTI
Participant
Posts: 9
Joined: Wed Nov 21, 2007 12:19 am

Re: Hashed File - Key column

Post by DEEPTI »

Thanks Nitin.

Is it necessary that the output columns should be in the same order like the input columns in the hash file?
Also In order to remove that key column, do I need to include another transformer.

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

Post by ray.wurlod »

I'm confused here. A hashed file MUST have at least one key column. In the Transformer stage you set up a key expression that generates a value that is looked up.

Order of key columns in the hashed file is vital. Order of non-key columns is not, provided that the metadata have been handled rigorously. But it's probably better to preserve the storage order of columns, because this will lead to more efficient extraction.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
swarnkar
Participant
Posts: 74
Joined: Wed Jan 11, 2006 2:22 am

Re: Hashed File - Key column

Post by swarnkar »

DEEPTI wrote:Thanks Nitin.

Is it necessary that the output columns should be in the same order like the input columns in the hash file?
Also In order to remove that key column, do I need to include another transformer.

Regards,
Deepti
Deepti,

If you want to reorder the columns then you have to maintain their position in the"Postion" grid of "Column" tab. Just mentioned the column position as in the file while creating it.

And as per my understanding of hashed file, One woun't be able to read data properly if the key columns differs while reading as against while writing the hashed file.

I request to DS Gurus to clear/confirm my understanding hashed file.

Regards,
Nitin Swarnkar.
Post Reply