Skip to content
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

SQLAlchemy dialect #305

Open
xhochy opened this issue Oct 9, 2019 · 2 comments
Labels

Comments

@xhochy
Copy link
Contributor

@xhochy xhochy commented Oct 9, 2019

This is probably also useful for #302 when integrating with Ibis but also in general a feature people are using. The important part here is to have an SQLAlchemy dialect to render queries, connect to the database and get metadata about the tables. The acutal ORM that comes with SQLAlchemy is totally useless for data analytics (it's good when developing a blog) as it creates a lot of Python objects.

SQLAlchemy is often used as a more convinient access layer for databases in Python than the DB-API 2.0.

As duckdb is based off Postgres SQL-dialect wise, you probably can build upon that dialect.

@hannesmuehleisen

This comment has been minimized.

Copy link
Contributor

@hannesmuehleisen hannesmuehleisen commented Oct 9, 2019

I agree, its probably a good idea to support this. We need to look int result set construction performance though.

@xhochy

This comment has been minimized.

Copy link
Contributor Author

@xhochy xhochy commented Oct 9, 2019

I agree, its probably a good idea to support this. We need to look int result set construction performance though.

That is too slow when you have large results. Dialect and metadata are the great wins. SQLAlchemy needs someone to write an extension in future so that the sqlalchemy.Engine can return pandas/numpy/.. but for now I always render the query to a string and use raw_connection() for the result heavy queries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.