-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
feat(python): Support passing instantiated adbc/alchemy connection objects to write_database
#16099
feat(python): Support passing instantiated adbc/alchemy connection objects to write_database
#16099
Conversation
…jects to `write_database`
2bbdf1d
to
a75500c
Compare
f6d946a
to
b97beb0
Compare
b97beb0
to
3f8f6b2
Compare
@alexander-beedie Thank you for the updates. To confirm, these updates are not yet available, right? |
Correct - coming in |
Do you need a documentation update for this? Happy to make a PR if so. |
@MrAlexBailey An update to the User Guide docs would be very welcome! (The function docstring itself has some examples/explanation, but a guide entry with more detail would be great 😎) |
Closes #16095.
Closes #16053.
Closes #15538.
Also: ref #7852.
So, The Great Database Write Rewrite™ is still pending, but this PR closes a number of outstanding Issues and enables various opt-in speedups to ensure that we can take better advantage of the underlying engines that we currently call in to (
sqlalchemy/pandas
andadbc
).ℹ️ This is a non-breaking change; all existing usage is unaffected.
Updates
fast_executemany
for pyodbc mssql connections, and other per-connection configuration parameters.engine_options
parameter that gets passed down to the chosen engine's underlying insert method (eg: pandas'to_sql
if using SQLAlchemy, oradbc_ingest
if using ADBC).Examples
Establish a pyodbc connection using "fast_executemany=True" and insert using that:
Use a regular URI connection and pass "method='multi'" down to the
to_sql
insert method: