hash file 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
vinsashi
Participant
Posts: 150
Joined: Mon Aug 20, 2007 4:52 am
Location: singapore

hash file lookup

Post by vinsashi »

hi,
data loaded to from oracle db to seq file and hahsfiles and key columns are column1 and column2. but column2have null data.in the next job joined based on key columns both seq file and hash file but condition not failed even though null values in column2.could you please clarify seq file and hash file how will handle null data ..
Thanks
REDDY
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Firstly, the correct nomenclature is "hashed" file, not "hash" file.

It's perfectly OK for non-key fields to contain NULL, just as it would be in a database join.

The hashed file even allows for part of the key to be null, in a multi-column key. (You may disagree with this, but it's how it works.)

Provided that the fields are marked as nullable, the field value - whether NULL or not - will be transferred to the output link of the Transformer stage where there is a key match.
Last edited by ray.wurlod on Mon Jul 06, 2015 10:36 pm, edited 1 time in total.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Re: hash file lookup

Post by SURA »

vinsashi wrote:but column2have null data.
1. Is it really NULL?

2. Can you able to query the data in Oracle where col2 is null?
Thanks
Ram
----------------------------------
Revealing your ignorance is fine, because you get a chance to learn.
vinsashi
Participant
Posts: 150
Joined: Mon Aug 20, 2007 4:52 am
Location: singapore

Post by vinsashi »

Hi,
below is my sample query. where column2 have null data in both tables. if execute in db no records.
SELECT * FROM table1 a,table2 b
WHERE a.column1=b.columns1
and a.column2=b.column2

same scenario in datastage job its passing records to output.
by using seq file and hashed file. its ignoring column2 join.
Thanks
REDDY
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Is your hashed file lookup set up properly? Are you certain you've set up both Column1 and Column2 as keys in the hashed file so both are passed to the hashed file from the transformer and used for the join?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply