You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
github-actionsbot
changed the title
executemany fails using subquery with multiple rows in bind list - throws error: "Bind variable ? not set"
SNOW-940628: executemany fails using subquery with multiple rows in bind list - throws error: "Bind variable ? not set"
Oct 13, 2023
My esteemed colleague, @cdena-accelins figured it out using this article. The solution was using both positional arguments in the select clause and a values clause with question marks for the values from the list.
snowflake_cursor.executemany(f"insert into {table_name}(f1, f2) select $1, parse_json($2) from values (?, ?)", data_to_insert)
Python version
Python 3.11.0 (main, Oct 24 2022, 18:26:48) [MSC v.1933 64 bit (AMD64)]
Operating system and processor architecture
Windows-10-10.0.22621-SP0
Installed packages
What did you do?
What did you expect to see?
Multiple records should be inserted
Can you set logging to DEBUG and collect the logs?
The text was updated successfully, but these errors were encountered: