Page 1 of 1

Do not want null value records to be rejected by Lookup Stg

Posted: Sun Oct 13, 2019 7:13 pm
by nikita.bandekar
I have a lookup stage which has input records with null values. Basically I want the lookup stage to Reject records when there are unmatched records but continue when there are null values on the key.
My input columns and receiving columns are nullable and Lookup Failure is set to 'Reject'

Not sure where i am going wrong.
Thanks in advance.

Regards,
Nikita

Posted: Mon Oct 14, 2019 6:20 am
by chulett
Take this with a grain of salt as it's been a long time but I think you'll need to stop rejecting any records by the Lookup stage. After the lookup, query the results and "reject" them yourself by looking for NULL values in the returned keys and compare that to the submitted keys. Decide based on the source values.

Posted: Mon Oct 14, 2019 11:16 pm
by ray.wurlod
Use a conditional lookup with an IsNotNull() condition on the lookup key in the stream input, and mark the Condition Failed rule Continue.

Posted: Tue Oct 15, 2019 6:23 am
by chulett
A "conditional lookup"? All that comes to mind is something from years ago, a specific stage which was only available in the mainframe version of the product. Has that been merged into the core product?

Okay, a quick search seems to confirm my memory. It is only listed under the Mainframe Job Stages topic online and for some reason only up through the 9.x version of the product. Odd that trying to switch the version to 11.x give me an error about no matching topic. :?

Still seems to me that you will need to provide the conditional logic...

Posted: Tue Oct 15, 2019 5:59 pm
by nikita.bandekar
ray.wurlod wrote:Use a conditional lookup with an IsNotNull() condition on the lookup key in the stream input, and mark the Condition Failed rule Continue. ...
This worked like a charm!! :D
Thank you guys for your help :)

Posted: Wed Oct 16, 2019 6:24 am
by chulett
So... it is no longer relegated to only existing in the Mainframe product? Seems I need to go scrub through the online help again. :?