SNOW-522232: SAWarning: Dialect snowflake:snowflake will not make use of SQL compilation caching as it does not set the 'supports_statement_cache' attribute to ``True``.
See original GitHub issuePython 3.8.9 macOS-11.6.2-x86_64-i386-64bit snowflake-connector-python: 2.7.2 snowflake-sqlalchemy: 1.3.3 SQLAlchemy: 1.4.28
I imported the following…
import pandas as pd
from sqlalchemy import create_engine
from snowflake.sqlalchemy import URL
import snowflake.connector
Then, I created a new engine and executed my first query…
url = URL(CREDENTIALS)
engine = create_engine(url)
connection = engine.connect()
pd.read_sql(QUERY, connection)
Received the following warning…
/Users/NAME/.local/lib/python3.8/site-packages/snowflake/sqlalchemy/snowdialect.py:206: SAWarning: Dialect snowflake:snowflake will not make use of SQL compilation caching as it does not set the ‘supports_statement_cache’ attribute to
True
. This can have significant performance implications including some performance degradations in comparison to prior SQLAlchemy versions. Dialect maintainers should seek to set this attribute to True after appropriate development and testing for SQLAlchemy 1.4 caching support. Alternatively, this attribute may be set to False which will disable this warning. (Background on this error at: https://sqlalche.me/e/14/cprf)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:6
- Comments:9 (2 by maintainers)
Top GitHub Comments
For those who’d like this warning to be disabled do this before creating an engine:
Could we just set
supports_statement_cache
toFalse
for now? Preferably in this package, rather than users doing it manually.