Problem with Hashed file

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
dsusersaj
Premium Member
Premium Member
Posts: 160
Joined: Mon Dec 17, 2007 10:44 am

Problem with Hashed file

Post by dsusersaj »

Hi All

I have a strange issue with one of the DS jobs

Here is the design
I grab three columns from one of the tables say A ,B ,C and pass them on to hashed file which is then used for lookup .

A is typically pARTY id for me and it gives me a value of 0 in the hashed file for a perticular B and C VALUES, but , when I check the actual database it has 'xxxxxx' numeric value , this happens to only a few records though..

Can anybody help me out to figure out what the problem could be.

Thanks
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

A couple of things to check:
- Make sure you create and read the hashed file with identical metadata, including the keys
- If there are any duplicates in your source then the hashed file will only retain the last record. Hence its quite possible that you are look at one record in the database and the hashed file is showing the nth record which your failing to see in your source. Do a group by on the key and count(*) with "having count(*) > 1" at the end of your sql against your source database.

And yea, Welcome Aboard :)
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
satya99
Participant
Posts: 104
Joined: Thu Nov 30, 2006 1:22 pm

Post by satya99 »

Write the record to sequential file ( the one with 0) and check them.
satya
dsusersaj
Premium Member
Premium Member
Posts: 160
Joined: Mon Dec 17, 2007 10:44 am

Post by dsusersaj »

Yes my metadata for party_id was different . In the input it is numeric(20) and in output decimal(20). I am guessing that this is the problem. Needs to do the testing.

Thanks!

DSguru2B wrote:A couple of things to check:
- Make sure you create and read the hashed file with identical metadata, including the keys
- If there are any duplicates in your source then the hashed file will only retain the last record. Hence its quite possible that you are look at one record in the database and the hashed file is showing the nth record which your failing to see in your source. Do a group by on the key and count(*) with "having count(*) > 1" at the end of your sql against your source database.

And yea, Welcome Aboard :)
dsusersaj
Premium Member
Premium Member
Posts: 160
Joined: Mon Dec 17, 2007 10:44 am

Post by dsusersaj »

Also , is there a possiblity that if the sam table is accessed by another job at the same time (is it possible for a data anomaly..... I am not sure about the otehr job run but just in case if this is the case )

Thanks
Post Reply