Forum Discussion
When Truncate StageMCRC… completes, It will produce an output, the Select AXMCRCoup… snap will try to read from MCRCouponcatalog table, but because it’s empty, it will pass through the response from the Truncating Operation snap, that will trigger the Mapper, where you mapped the required fields, but because the fields are not received on the input schema and the Null-Safe access is enabled, you’ll end up with the mapped target paths, but with null as values. The rest is clear, The CATALOG column doesn’t allow NULL as value, so you end up with an error on your Insert snap.
@rpathak see above, this is quite correct.
You can handle this in the mapper by changing the “Expression” entries: replace the “bare” JSON properties with snippets of Javascript to replace null with a value of your choice.
If you never want to insert these, an alternative solution is to insert a decision snap into your flow. Pick any property name that represents a non-nullable table column/value, and continue down the path with the INSERT snap only if that property is not null.