SNOW-638842: "WHERE xxx IN :param" does not work as expected
See original GitHub issue-
What version of Python are you using? 3.8.13
-
What operating system and processor architecture are you using? macOS-12.4-x86_64-i386-64bit
-
What are the component versions in the environment (
pip freeze
)? snowflake-sqlalchemy==1.2.4 sqlalchemy==1.3.23 -
What did you do?
schemas = ('a', 'b') # same issue when schemas is a list
query = """
SELECT schema_name
FROM information_schema.schemata AS s
WHERE s.schema_name IN :schemas
"""
results = conn.execute(sqlalchemy.sql.text(query), schemas=schemas)
Expected
SELECT schema_name
FROM information_schema.schemata AS s
WHERE s.schema_name IN ('a','b')
Actual
SELECT schema_name
FROM information_schema.schemata AS s
WHERE s.schema_name IN 'a','b'
There is a workaround which is to add the parens in the query string e.g
WHERE s.schema_name IN (:schemas)
Issue Analytics
- State:
- Created a year ago
- Comments:7
Top Results From Across the Web
Issues · snowflakedb/snowflake-sqlalchemy
SNOW-679045: _rfc_1738_quote is no longer available in sqlalc. ... SNOW-638842: "WHERE xxx IN :param" does not work as expected bug needs triage.
Read more >Parameter value [1] did not match expected type [java.lang. ...
I tried to change Integer to Long or String it helped to fix my problem but in this case my Spring Data Rest...
Read more >Building a Parameter Table for Power Query
Today I'm going to show you how I solved that problem by building a parameter table for Power Query in Excel, then link...
Read more >snowflakedb/snowflake-sqlalchemy Issues
SNOW-679045: _rfc_1738_quote is no longer available in sqlalchemy 1.4.42 ... SNOW-638842: "WHERE xxx IN :param" does not work as expected.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@shusson , apologize for the late response, I was working on some other prioritized stuff. yes, I will check how postgres implements it
This is still an issue for us @sfc-gh-aling @sfc-gh-mkeller. Can we re-open this ticket?