Does dbt have exception handling for DML/DDL code?

yeah - I have a similar recent post in “Can dbt do this…” I cannot find where there is exception handing built into the dbt model architecture, that would allow you to trigger the corresponding exception handling code (DML or DDL code). When I write snowflake stored procedures, I can do anything in them, including proper exception handling. I am thinking that dbt should have a “when_exception” hook to deal with this.

Hey @ddumas,

When dbt hits a DML/DDL error, it stops execution of that model, reports it as a failure and will continue on to the rest of the project (although it will skip building downstream nodes).

If you would like to suggest adding hooks to handle these exceptions, the best thing to do would be to open an issue on the Core repo.

Hey Joel,

Thanks - I just added that as a request, as you suggested.

Dave

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.