I'm trying to run a transaction in snowflake's query. Transactions are by nature are multi-statement. Whenever I run a multi-statement query I'm getting error:
error:"Actual statement count 7 did not match the desired statement count 1."
Thanks for reaching out! Unfortunately, it looks like we don't support multi-statement Snowflake queries We are tracking requests for this. It isn't currently being worked on, but I will reach out here if that changes.
For the insert, if you skip the id entirely, it should insert your record with the next value. On success, you could have another query that returns the id of the largest primary key, if it auto-increments. You could also look into creating a stored procedure
Has there been any progress around multi-statement support for Snowflake?
We're trying to run pretty simple queries that update 2 different tables on one button click. We are currently creating stored procs in Snowflake or having to change together multiple Retool queries which isn't great from a code management prospective.