-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ENH: The need to re-design to_sql() method #49246
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
Comments
-1 this is not pandas responsibility - most of this is deferred to sqlalchemy already |
There will exist some operations that is very different among different dbs, for example the upsert operation. |
While not an author of this particular method, the philosophy of most pandas IO methods ( Likewise, The issues you link are nuanced needs for particular schema. The |
Thanks for the suggestion, but I would be -1 on refactoring or removing |
Feature Type
Adding new functionality to pandas
Changing existing functionality in pandas
Removing existing functionality in pandas
Problem Description
There exists too much issues about this functionality, some even not close for 5 years. The original design of to_sql didn't fully take different db_dialects into consideration. Overly high level design of this function also prohibits the testing and functionality changing of this function, some PR #48331 was even being blocked due to unrelated test issues, which largely discourages the community.
To this extent, I would like to suggest breaking it down to some more specific and lower-level functions, like _to_sql_oracle, etc
making this less.
Another suggestion is that: It is acceptable if only partial functionality is implemented, say, only for a certain kind of db is designed. If some funcitonality is not officially supported, presenting example gist/code snippets in the document is also a good choice.
Refered issues:
#15988
#48331
#15988
#40647
#35347
#41335
Feature Description
Breaking down the to_sql() into lower level dbs, according to the connection type.
Alternative Solutions
see description.
Additional Context
No response
The text was updated successfully, but these errors were encountered: