Page 1 of 1

Removing missing or null warnings

Posted: Tue May 20, 2008 5:55 am
by jackdaw
Hi

I get a gazillion warnings in Director log - <Missing or NULL> (<Missing or NULL>): <Missing or NULL> - which I'd like to get rid of so that I can run with 50 warnings limit. The job has several standard transforms looking up values on a hash file to return another code. There don't appear to be missing (key or otherwise) values on the hash file. What is the most likely cause ?

Cheers

Posted: Tue May 20, 2008 6:27 am
by chulett
Well... that *is* the most likely cause, writing a null key to a hashed file. However, we can't really tell because you've just posted a snippet from the error. It would help greatly if you posted an example of the actual error so we can see it in its entirety.

Also please clarify - you are only doing hashed lookups in the job, no hashed writes? :?

Posted: Tue May 20, 2008 6:34 am
by jackdaw
Hi

Please excuse - the error in its entirety in the Director log is, unfortunately, as posted. Presumably there's some other way of detailing the error then ? :oops:

And there are no writes to the hash file; it's just used as a lookup.

chulett wrote:Well... that *is* the most likely cause, writing a null key to a hashed file. However, we can't really tell because you've just posted a snippet from the error. It would help greatly if you posted an example of the actual error so we can see it in its entirety.

Also please clarify - you are only doing hashed lookups in the job, no hashed writes? :?

Posted: Tue May 20, 2008 6:36 am
by ArndW
Doing a lookup using a null key will generate the same error.

Posted: Tue May 20, 2008 6:45 am
by jackdaw
OK, thanks. So I've tried this - in the key expression field for the hash file I've done a test e.g:

Code: Select all

if Not(IsNull(slk_input_file_dara.locode))  then trim(slk_input_file_dara.locode) else 99998
so that a dummy value is used as the key value if it would otherwise be missing. Then in the transform I test if the looked up value is not found (which it won't be) and if so set the field which should otherwise have a lookup value returned to it to a bucket value. Is there a more effective way of dealing with this type of error ?

Hope that makes sense !
ArndW wrote:Doing a lookup using a null key will generate the same error.

Posted: Tue May 20, 2008 6:53 am
by chulett
No, that would be a perfectly fine solution. And sorry for the brain fart, forgot the null lookup would generate the same error. Too early here, not enough coffee. :wink:

ps. I'd document this in an annotation on the canvas.

Posted: Tue May 20, 2008 7:34 am
by jackdaw
Many thanks.
chulett wrote:No, that would be a perfectly fine solution. And sorry for the brain fart, forgot the null lookup would generate the same error. Too early here, not enough coffee. :wink:

ps. I'd document this in an annotation on the canvas.

Posted: Tue May 20, 2008 7:35 am
by jackdaw
Many thanks. Probably too much coffee here !
chulett wrote:No, that would be a perfectly fine solution. And sorry for the brain fart, forgot the null lookup would generate the same error. Too early here, not enough coffee. :wink:

ps. I'd document this in an annotation on the canvas.

Posted: Wed May 21, 2008 4:13 am
by jackdaw
An update:

Finally tracked down source of warnings to a stage variable expression which used an input column with null values in some rows. All the hash lookup stuff was a red herring.

Issue resolved, thanks.

Cheers

Posted: Wed May 21, 2008 6:32 am
by chulett
Ah... that explains the abbreviated error message, me thinks. I screwed up yesterday and generated several of my own, writing to a hashed file with a null key - those are a wee bit more verbose and obvious as to the source:

Code: Select all

Job..Stage.Link: ds_uvput() - Write failed for record id '<Missing or NULL>' 
Time to mark this as Resolved.

Posted: Sun Jun 15, 2008 11:39 am
by vsi
Can we not try to replace a key, which can have null values with '' and make a lookup with ''

Because I have a situation where I have two keys A,B
and one of them (B) could be null sometimes. So can I try to replace the null with '' and load it into the key.

So that I can use A, TRIM(B) as lookup

Thanks

Posted: Sun Jun 15, 2008 1:56 pm
by chulett
Is that a question? If so, then, yes. Sure. You can choose any value you like to represent null that wouldn't otherwise appear in your data as long as you handle it consistently on both 'sides'. I've done that with '*' or '~' from what I recall.

Make sure you annotate this on the canvas. :wink: