Problem with Metadata while lookup

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
jaysheel
Participant
Posts: 57
Joined: Mon Apr 07, 2008 1:54 am
Location: Bangalore

Problem with Metadata while lookup

Post by jaysheel »

Hi,

I am facing a strange problem in one of my jobs. I am using a hash file which is loaded from an MS SQL 2005 db. The key field in this table is 'Customer_SA_ID' which is a surrogate key generated from another job.

The problem is when I just import the columns of the hash file and click 'View Data' I am able to see the data in proper shape. But when I use that hash file with another hash file to do a join (Join is based on another column which is present in both the hash files) then the data is getting shifted to one column right. Means the Customer_SA_ID column will contain the data of the previous column.

But without the join in transformer the source hash file is giving data perfectly. This is the weiredest problem I have ever faced.

If anybody can tell me the reason or some get around then it would really helpfull.

Thanks in advance
- Jaysheel -
- Jaysheel -
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Hashed files are not database tables that support dynamic metadata, the Key and Non-key (data) fields are positional. So (at a high level) all columns must be mentioned in the proper order or the data will appear to 'slide around' into the 'wrong' field.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ganesh.soundar
Participant
Posts: 9
Joined: Tue Jan 08, 2008 7:21 am
Location: Chennai

Re: Problem with Metadata while lookup

Post by ganesh.soundar »

Hope the Metadata of the hashed file might be changed and the changes is not reflected in the file that is created. It means the Hashed file will have the old metadata structure. Delete both the Hashed files and run the job as a fresh one.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

That will not accomplish the desired result unless the Position field in the Columns collection is used to indicate the field number in the hashed file data record.
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