-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
BigQuery should have a module that follows the DB-API to allow for a SQLAlchemy dialect #2434
Comments
This is a good topic, very useful. |
@tswast BigQuery's DML support is still marked as experimental: I would want to see some API stability commitment on the back-end before trying to implement DB-API semantics. |
I'd like to use this on my projects. Are there plans to build support? |
@jkilpatricksc I have a pull request open, but it's not complete. Working on it! |
There is some tentative of plugging sql alchemy: Having Big Query connector to SQL Alchemy would give a strong incentive to use Big Query |
Maintainer on Superset here (https://github.com/airbnb/superset) @tswast I'm curious to hear how far you made it. It seems like it should be fairly straightforward to mimic DBAPI and to define a SQLAlchemy dialect. Note that the dialect can be incomplete and limited to work for read, as [of course] you wouldn't use DML or expect to use an ORM on top BigQuery. Also there's a need to implement the metadata-fetching methods to allow us to fetch metadata around tables/views/columns/types. For reference, the |
I paused my work on #2921 but am restarting it now. I'm glad to hear there's interest in this. |
#3460, now merged, added |
The documentation for the BigQuery DB-API is now published. |
There is a module to connect SQLAlchemy to BigQuery, but it only has partial support. I'd love to be able to connect to BigQuery using SQLAlchemy this way and be able to play with Caravel as was mentioned in that partial support issue.
To do this properly, we'd need to provide a module with an implementation of a SQLAlchemy dialect I would imagine we'd want to package this separately so as not to add a dependency on SQLAlchemy. Looking more closely at the dialect interface it looks like the database driver would need to implement the Python DB-API.
I'm considering this a low priority feature request, but do think it would be cool.
The text was updated successfully, but these errors were encountered: