Use run_query
to execute a multiple-statement block with BEGIN-END (i.e. create procedure)
#10810
lucianmoldovanu
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to have
run_query
in Jinja create a procedure in the Snowflake target warehouse (conditional on some inputs being satisfied).The code of the procedure is generic:
The problem is that when using
run_query
the semicolon after <statement 1> is taken as a separator and the following code is attempted to be run (which obviously fails because it's incomplete).I have tried using the lower-level approach, yet this encounters the same issue:
I am using DBT core ~1.8 &
dbt-snowflake
adapter.Am I missing something in DBT docs that would enable me to run such code without it being broken down? This is applicable to i.e.
create procedure
,create task
etc in Snowflake. In general wherever a BEGIN-END block makes sense to define a block of multiple statements.Beta Was this translation helpful? Give feedback.
All reactions