Page 1 of 1

Hashfile Issues

Posted: Thu Mar 17, 2005 9:29 pm
by Aravind
Job design is like this

Folder--> XML Parser --> Hashfile1 ---> Transfomer---> Hashfile2.

I have defined the Hashfile2 with 3 keys and one of the keys is formulated as the concatenation of 10 fields. The issue that i am facing is whenever a xml tag is missing or if the value for a tag is null, the key forumulated by this filed is getting populated as null evenif I have mentioned the field not to be nullable.Can a key field of hashfile be null.


2 Dstage job design


Hashfile1 ------>
Transfomer-------> Hashfile3
Hashfile 2 ------>


In Hashfile1 is the primary link and the constraint specified in the transformer is (isnull(keycolumn in hashfile2). Hence I expected null values for fields in Hashfile3 which have the derivation from hashfile2. But this is not the case when the key column in hashfile1 is null.

Is this a expected result if the null values are not handled?

Posted: Thu Mar 17, 2005 9:43 pm
by kcbland
It's a quirky thing, but yes a column in a multi-column key can be null. The "nullable" metadata doesn't matter. If you don't want these rows, you must put a constraint in to check for these. If a hash file only has one column as a key, it cannot be null. The rationale is that a multi-column key is really a concatenated string, so a column can be null, it's just treated as a blank.

In your second question, is a row being found for reference? Looking at the link monitor will show if a row is being found. If a row is not found for reference, then all column values on that not-found row will be @NULL. If you are getting values, then you are getting a row on reference.

Posted: Thu Mar 17, 2005 10:24 pm
by Aravind
Thanks Kenneth.
In the second scenario,
The lookup hashfile I am using is having mutlikey. One of the key columns is having a null value and this key column happens to be the one checked for null in the transfomer constraint. So is there a chance that this particular record can pass through eventhough the lookup fails.