Welcome to Microsoft Q&A platform and thanks for posting your question.
It seems like the new Snowflake connector has a limitation where it sets multi_statement_count = 1
by default, which prevents running multiple SnowSQL statements in one script activity. This is different from the old Snowflake connector which sets multi_statement_count = 0
by default, allowing multiple SnowSQL statements to run in one script activity.
Here are a few potential workarounds you could consider:
- Stored Procedure: You could wrap all your SQL statements within a stored procedure. Then, in the ADF Script Activity, you would only need to call your stored procedure.
- num_statements Parameter: According to the Snowflake Connector for Python release notes, multi-statement query execution is now supported through
cursor.execute
andcursor.executemany
. An additional argument,num_statements
, can be provided toexecute
to use this parameter at the statement level.
Hope this helps. Do let us know if you any further queries.