'Stored Procedure Error Records Capture in Snowflake

I am merging the data from Source to Target via Stored Procedures in Snowflake. But there are some rejections of records while merging. How to capture those rejected records in a table or file?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source