09-17-2021 05:23 AM
Hi,
My pipeline is running successfully when I have data in the source table. But when there is no data on the source then the Insert snap got failed with the message that the null value is not allowed in the table.
We have mentioned the not null in the table but once we haven’t any record from the source then why the Insert Snap is looking into the table for a null value.
Mention below is the pipeline for your reference:-
09-21-2021 03:29 PM
@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.