-
Notifications
You must be signed in to change notification settings - Fork 78
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
Support passing existing connections #16
Comments
Another great example of this use case (this was solved via the Duckdb team) |
I'm thinking something like this: from sqlalchemy import create_engine
engine = create_engine("...") Then: %sql $engine IPython supports variable expansion via |
It's a bit unclear to me the original issue in the ipython-sql repo. I don't understand if the user wants to re-use an existing engine (what I described in the comment above). Or they want to re-use an engine they created with |
I think that's the first option. |
This is still a nice and helpful feature, even if DuckDB can already read dataframes without it! One use case is if you store your dataframes in a dict, you would want to be able to register them with DuckDB (since it won't find them djrectly anymore). |
@Alex-Monahan thanks for the feedback! Do you think it's related to this issue or a completely new one? |
The ability to either pass in an engine or refer to the engine variable and call a function directly on the connection would work in this case. I think that is what this proposes, but I am not certain! |
Awesome, yes it is! |
hey @Alex-Monahan, @machow, this has been fixed! Available in version 0.5.1. Docs here. Let us know if you have any issues/feedback! |
fyi: @pfmoore @gwerbin @rehno-lindeque @ellisonbg @ckald Make sure to join our slack for more info and support |
The initialization locks the context to a specific engine. See example
We'd like to allow users to connect to an engine directly by reference (similar to SQL alchemy).
The text was updated successfully, but these errors were encountered: