Snowflake Vs MS-SQL - Part 117 - Error Handling - DML


Error Handling - DML

When you are working on bulk DML operations and a particular row's data mismatches the table structure, the statement fails.

MS-SQL Server

We can see it here; this statement will fail with "Cannot insert the value NULL into column does not allow nulls" or "Conversion failed when converting". As a result, zero records will be inserted.



In Snowflake, we can use ERROR_LOGGING as follows; as a result, two records with errors will be skipped, and a single record will be inserted:





Yogesh Shinde

Comments

Popular posts from this blog

Snowflake Vs MS-SQL - Series

Snowflake Key Concepts

Snowflake Vs MS-SQL - Part 46 - RATIO_TO_REPORT