Page 1 of 1

All records not loading into hash file

Posted: Mon Oct 21, 2013 10:58 am
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

Posted: Mon Oct 21, 2013 11:31 am
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.

Posted: Mon Oct 21, 2013 11:58 am
by oracledba
so if i want all the records to come in is there some property i can enable to make it happen.

Posted: Mon Oct 21, 2013 1:01 pm
by MarkB
Pretty simple. As Craig said, don't have duplicate keys.

Posted: Mon Oct 21, 2013 1:12 pm
by oracledba
if you want to allow duplicates can you use another stage?

Posted: Mon Oct 21, 2013 1:14 pm
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?

Posted: Mon Oct 21, 2013 1:31 pm
by oracledba
i want all rows to be returned when duplicates are present during lookup

Posted: Mon Oct 21, 2013 1:52 pm
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?

Posted: Mon Oct 21, 2013 3:10 pm
by ray.wurlod
No more server job stage types of which I'm aware.