Automatic failure of a Dataform Action

Hello Community,

I have the following situation: At some moment in time one Dataform Action fails. We have a code segment like this:

BEGIN

SQL Code that may fail

Exception

END

Although we have the Exception block where we log the error by catching the error we stop the failure to propagate to Dataform Executions board.

We need to catch the Exception but to also fail the Execution flow. Can we manually trigger the failure of the Dataform Action?

Thank you and Best regards,

Valentin

Hello Community,
I was able to find a solution for this issue: please see the code:

EXCEPTION
– Handle Exception
WHEN ERROR THEN ROLLBACK TRANSACTION;
RAISE USING message = FORMAT(“Execution of %s %s line, caused the error: %s.”, @@error.statement_text, @@error.formatted_stack_trace, @@error.message);

1 Like