Page 1 of 1

set default value on look up failure

Posted: Wed May 16, 2018 3:30 pm
by perspicax
I have set the lookup stage conditions to 'continue' on lookup failure. These lookups are surrogate key lookup. It's defaulting to 0 for these values. Is there a way to default to a different value, let's say -1?

Thanks

Posted: Thu May 17, 2018 5:05 am
by qt_ky
Not directly, but you can set the output column to nullable then check for null in a subsequent Transformer stage then set the value to whatever you want to.

Posted: Thu May 17, 2018 11:05 am
by UCDI
if dealing with 'very' large volumes and few failed lookups you may find it more efficient to reject them and only transform the reject link, then funnel back. But generally, the above is the best way. Its more stages to reject but less actual work, as far as I can tell.

Posted: Fri May 18, 2018 12:41 pm
by perspicax
It works! I was using isnull vs ISNULL to handle and I think it is case sensitive.

In the hash file look up there is a function called NOTFOUND. Is this not relevant in parallel jobs?

Thanks!

Posted: Sat May 19, 2018 8:06 pm
by ray.wurlod
It's not relevant in parallel jobs because you should use the reject link functionality instead.