Closed auderson closed 2 years ago
The ValueError raised was added in #42546 cc @fangchenli
We currently only support pymysql through sqlalchemy.
Confirming this is breaking in 1.4.0rc0
It used to work earlier (prior to the linked PR) as the con
object was getting passed into SQLiteDatabase
which looks generic enough to accept any DBAPI2 connection obj.
Same error when using pymssql in 1.4.0rc0
We have documented that we only support sqlite3 for plain DBAPI2 connection objects:
But it is true that any connection has implicitly worked up to now as long as you are just reading a query (not reading a table or writing). Given that this has worked for so long, we should probably not just change it without warning.
Thanks @jorisvandenbossche 2 clarifying points:
pd.read_sql('table_name', sqlite3_conn)
fails with DatabaseError: Execution failed on sql 'table_name': near "table_name": syntax error
. The decision whether to pass to read_sql_table
only seems to be happening for sqlalchemy
connectionsGiven that this has worked for so long, we should probably not just change it without warning.
@jorisvandenbossche Is this severe enough to block 1.4.0?
we could maybe revert #42546 for now
Pandas version checks
[X] I have checked that this issue has not already been reported.
[X] I have confirmed this bug exists on the latest version of pandas.
[ ] I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
the above code raises
ValueError: pandas only support SQLAlchemy connectable(engine/connection) ordatabase string URI or sqlite3 DBAPI2 connection
Expected Behavior
Is pymysql not supported anymore?
Installed Versions