snowflake-connector-python icon indicating copy to clipboard operation
snowflake-connector-python copied to clipboard

SNOW-521252: Multiple statements per API Call

Open jordantshaw opened this issue 2 years ago • 3 comments

What is the current behavior?

Currently multiple SQL statements are not supported for a single API call. If multiple SQL statements are included in a single call, the following error is thrown.

Snowflake.connector.errors.ProgrammingError: Multiple SQL statements in a single API call are not supported; use one API call per statement instead.

What is the desired behavior?

Support multiple SQL Statements per API call.

How would this improve snowflake-connector-python?

This would be extremely useful if variables are needed within a SQL statement. This is also useful for creating and using temporary tables and temporary stages within your SQL statements without having to do multiple calls.

References, Other Background

jordantshaw avatar Dec 21 '21 16:12 jordantshaw

Let's review this ticket and prioritize it @sfc-gh-hkapre

sfc-gh-mkeller avatar Jan 13 '22 19:01 sfc-gh-mkeller

@sfc-gh-mkeller any updates on where this is on your priority, or when it might be added?

jordantshaw avatar Mar 10 '22 16:03 jordantshaw

This would be great for Airflow users who are using this connector via SnowflakeOperatorAsync

kaxil avatar Apr 14 '22 09:04 kaxil

@sfc-gh-hkapre & @sfc-gh-jhollan, do either of you by chance have any updates to report on this issue? A status update on any development work and/or a priority update would be greatly appreciated whenever your schedules allow. We are currently leveraging the snowflake connector in a Databricks notebook, but we aren't able to return data currently as desired because our query uses multiple variables. We can retrieve data and then apply the variables in Python, but our preference would be to handle this in the query if possible.

mitch-tanney-coterie avatar Oct 25 '22 16:10 mitch-tanney-coterie

We are working on this right now. @sfc-gh-heshah could you provide more update?

sfc-gh-jdu avatar Oct 25 '22 17:10 sfc-gh-jdu

#1281 👀

sfc-gh-mkeller avatar Oct 26 '22 06:10 sfc-gh-mkeller