-
-
Notifications
You must be signed in to change notification settings - Fork 18k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: Add table prefixes to to_sql method #60409
base: main
Are you sure you want to change the base?
Conversation
…andas into table_prefixes
Thanks for the PR, but this seems to only work with SQLAlchemy, meaning we won't get the same behavior for our ADBC drivers. I don't think this is worth pursuing unless there is a way to avoid fragmenting features across those two different areas |
I took a look into the ADBC implementation. |
I did some testing and was able to implement the feature partially for Now the question is:
I personally prefer the first option, because I connect to |
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.This PR adds a
prefixes
parameter to theto_sql
method and passes it down to the underlyingsqlalchemy.Table
class. It takes into account that temporary tables are not stored in a database's meta data and adds temporary table specific methods for_exists_temporary
and_drop_temporary_table
.Unfortunately, temporary tables don't work with null pooling, so I had to create additional sqlalchemy fixtures with the default pooling.
TODO:
SQLDatabase.check_case_sensitive
checks the databases's meta data. It will never find a temporary table and always throw a Warning. - I disabled case sensitivity checks for temporary tables.