Error on hash files

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
boligoma
Premium Member
Premium Member
Posts: 24
Joined: Tue Apr 24, 2007 3:07 pm

Error on hash files

Post by boligoma »

Hi,

I'm trying to use two hashed files in a transformer job. Hash File 1 (the main row operation) has exactly the keys as Hash File 2. In fact, I created Hash File 2 from Hash File 1 in another job.

The only difference I see is that Hash File 1 is downloaded in an Oracle Table. I made a group by and a operation and put it again in a Hash File (hash file 2).

There are no results coming from Hash File 2, although it has the same keys, I even tried to put one single row that appears in both files and there is no information returned. The definition on both jobs is OK.

Please help,

Thanks,
Ismael Martinez
Intellego SC
www.grupointellego.com
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Make sure your keys are trimmed, both for the source and lookup.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
boligoma
Premium Member
Premium Member
Posts: 24
Joined: Tue Apr 24, 2007 3:07 pm

Post by boligoma »

Hi, what do you mean by trimmed?
Ismael Martinez
Intellego SC
www.grupointellego.com
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Apply Trim() function on the keys. Because 'ABC' <> 'ABC '.
ANother possiblity might be that you are doing a group by operation, is there any chance of transforming a column that is being used as a key in the hashed file? If any single key is different, the lookup will fail.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
gateleys
Premium Member
Premium Member
Posts: 992
Joined: Mon Aug 08, 2005 5:08 pm
Location: USA

Post by gateleys »

boligoma wrote:Hi, what do you mean by trimmed?
In your designer, click on Help menu, and search for TRIM.

gateleys
boligoma
Premium Member
Premium Member
Posts: 24
Joined: Tue Apr 24, 2007 3:07 pm

Post by boligoma »

Thanks for the advice, I trimmed (never used it as a verb before) all the joins and the group by function in oracle and it worked fine. I thought it was an issue about a corrupt file or something like that...
Ismael Martinez
Intellego SC
www.grupointellego.com
Post Reply