-
Notifications
You must be signed in to change notification settings - Fork 77
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
Use an alternative output format when using DuckDB #536
Comments
As a DuckDB user, this would make jupysql much more useful. The DuckDB Perhaps this could be implemented via keeping the initial default the ResultSet, and then allowing users to opt into producing DuckDB relations by default, similar to how you can set the default output to Pandas or Polars dataframes. eg something like:
This would result in an out of the box experience that's consistent with other back ends, but allow users to opt into the much more useful |
Hey @edublancas, I've made a proof of concept for my above suggestion here. If you think this proposal has legs, I'd be up for working it into a PR. I'm not really that familiar with the jupysql codebase though, so I'm sure I'm overlooking some things. Would be keen to hear alternative suggestions! |
@ned2: thanks for working on this! I ran some quick tests, and here are my thoughts. You're on the right track; I think the best place to apply this change is in The critical consideration here is that there are two ways for users to connect to duckdb: sqlalchemy (via duckdb-engine) or with a native So to fix this, we need to create a new method similar to Then, in I'm unsure if autoduckdb is the best name, but let's get this working first and we can change the name later. feel free to ask any questions if this explanation isn't clear! happy to review a draft PR. |
DuckDB provides its own output format that we can leverage instead of converting things into ResultSet so if we're using a DuckDB connection we should use such format instead, see #451 (comment) for details
The text was updated successfully, but these errors were encountered: