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
I have an error on a simple update if I update more than one field. If I update only one field, no problems. Code to reproduce and the error is below:
version: snowflake-connector-python-2.1.2
#!/usr/bin/env python
""" test script to be sure connection with snowflake worked """
import json
import snowflake.connector
snowflake.connector.paramstyle = 'qmark' # prepared statement use `?`
credentials = {
'user': 'my_user',
'password': 'my_password',
'account': 'my_account',
'warehouse': 'my_warehouse',
'database': 'my_db',
}
ctx = snowflake.connector.connect(**credentials)
cs = ctx.cursor(snowflake.connector.DictCursor)
try:
cs.execute("UPDATE objective_source SET objective_id = 3, source_type_id = 3 WHERE id = 3 ")
finally:
cs.close()
ctx.close()
Traceback (most recent call last):
File "snowflake_connector.py", line 20, in <module>
cs.execute("UPDATE objective_source SET objective_id = 3 AND source_type_id = 3 WHERE id = 3 ")
File "/home/vagrant/.venv/lib/python3.6/site-packages/snowflake/connector/cursor.py", line 597, in execute
errvalue)
File "/home/vagrant/.venv/lib/python3.6/site-packages/snowflake/connector/errors.py", line 97, in errorhandler_wrapper
cursor.errorhandler(connection, cursor, errorclass, errorvalue)
File "/home/vagrant/.venv/lib/python3.6/site-packages/snowflake/connector/errors.py", line 73, in default_errorhandler
done_format_msg=errorvalue.get(u'done_format_msg'))
snowflake.connector.errors.ProgrammingError: 002023 (22000): SQL compilation error:
Expression type does not match column data type, expecting NUMBER(38,0) but got BOOLEAN for column OBJECTIVE_ID
The text was updated successfully, but these errors were encountered:
I have an error on a simple update if I update more than one field. If I update only one field, no problems. Code to reproduce and the error is below:
version: snowflake-connector-python-2.1.2
The text was updated successfully, but these errors were encountered: