As a workaround, you can wrap your SQL code in between BEGIN ... END statements.
BEGIN
UPDATE TABLE SET A = B;
UPDATE TABLE SET A= B;
END;
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have a pipeline, in Azure Data Factory that has an "Activity Script" that executes 3 instructions against Snowflake. The script was working fine until I have updated the Snowflake connection in order to remove the legacy Snowflake connection as you recommended. But now, my script does not work. I have seen in the Snowflake logs that the new connection executes this instruction in Snowflake: "alter session set multi_statement_count = 1;"; this means that the Activity Script only supports one instruction. How can I set the multi_statement_count parameter in order to be 0? (with the legacy Snowflake connection I have seen in Snowflake logs that an instruction "alter session set multi_statement_count = 0;" is executed).
Thanks in advance
As a workaround, you can wrap your SQL code in between BEGIN ... END statements.
BEGIN
UPDATE TABLE SET A = B;
UPDATE TABLE SET A= B;
END;
Hi @DavidR Apologies for the delayed feedback on this. For a deeper investigation and immediate assistance on this issue, please file a support request @ https://aka.ms/azsupt? If you do not have access to a support plan, could you please send an email to azcommunity@microsoft.com with the below details, so that we can work closely on this matter.
Thread URL: Link to this thread.
Azure Subscription ID:
Email Subject : Attn Leela
A workaround. In Snowflake, wrap all your SQL statements with a stored procedure. Then in ADF Script Activity call only your Stored Procedure.
ADF snowflake:
I have same issue with the error message 'Actual statement count 2 did not match the desired statement count 1'
The workaround to stored procs doesnt seem feasible since that will I have some dynamic strings to be executed, and that will be too much extra effort.
Late in the conversation, but You can use the Script: "non query" option instead "Query" , and you can run multiples statements with out problem.
I hope this helps.