ENH: add optional logging to read_sql #55797
Labels
Enhancement
IO SQL
to_sql, read_sql, read_sql_query
Needs Triage
Issue that has not been reviewed by a pandas team member
Feature Type
Adding new functionality to pandas
Changing existing functionality in pandas
Removing existing functionality in pandas
Problem Description
It would be a nice QoL upgrade to be able to pass any additional, optional, params to calls to
pandas.read_sql
which will be passed to any call tosqlalchemy.create_engine
. My particular use case is that I would like to passecho=True
topd.read_sql
so that the executed statements would be logged automatically, when using a connection string rather than an existing SQLAlchemy Connection.Feature Description
Add a new parameter to
pandas.read_sql
, eitherconnect_kwargs
orecho
. I'll provide an example for addingconnect_kwargs
Alternative Solutions
No alternative solution, besides using a SQLAlchemy connectable rather than the proposed edits.
Additional Context
No response
The text was updated successfully, but these errors were encountered: