All records not loading into hash 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
oracledba
Premium Member
Premium Member
Posts: 49
Joined: Mon Aug 06, 2012 9:21 am

All records not loading into hash file

Post by oracledba »

My Job design is,

Oracle------>Transformer------>HashFile

There are 100 records in source however only 50 records are loading into hash file. The performance statistics show 100 records loaded into hash file however only 50 records are there in the hash file. I checked the log and no warning or errors.

Performance statistics are like this.

ODBC---100 Rows--->Transformer----100 Rows-->Hash


replaced the Hash file with Sequential file and all records are loading no problem.


What is the cause for this???????


I need to use hash file as target because in a follow up job I am looking up this hash file. So I would like all these records to be available for the lookup of the hash file in the transformer coming from the reference link.



-Vetti
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Hashed files do not allow duplicates and do a 'destructive overwrite' when a duplicate key value is encountered. I suspect this is your issue.
-craig

"You can never have too many knives" -- Logan Nine Fingers
oracledba
Premium Member
Premium Member
Posts: 49
Joined: Mon Aug 06, 2012 9:21 am

Post by oracledba »

so if i want all the records to come in is there some property i can enable to make it happen.
MarkB
Premium Member
Premium Member
Posts: 95
Joined: Fri Oct 27, 2006 9:13 am

Post by MarkB »

Pretty simple. As Craig said, don't have duplicate keys.
oracledba
Premium Member
Premium Member
Posts: 49
Joined: Mon Aug 06, 2012 9:21 am

Post by oracledba »

if you want to allow duplicates can you use another stage?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Answer this question first - what do you want to happen when you do a lookup against a key value with duplicates? What should be returned?
-craig

"You can never have too many knives" -- Logan Nine Fingers
oracledba
Premium Member
Premium Member
Posts: 49
Joined: Mon Aug 06, 2012 9:21 am

Post by oracledba »

i want all rows to be returned when duplicates are present during lookup
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Then you need to use a stage that allows a 'multi-row result set' which means either the UV or ODBC stages. The former is a bit of a pain to setup and use so I'd suggest the latter set to lookup directly against the (apparently small) source table rather than trying to build an intermediate data set.

Perhaps they've relaxed this 'restriction' and allow that option multi-row on more stages... can anyone confirm / deny?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

No more server job stage types of which I'm aware.
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