-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
chore(deps): Migrate from crate[sqlalchemy]
to sqlalchemy-cratedb
#29243
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! We very much appreciate it :) Running CI. 🤞 |
@amotl it seems likely you've contributed to both the |
Hi @john-bodley. Thanks for asking.
The Python DB API HTTP driver is stable, and does not receive many changes any longer, actually mostly none. This is by far not the case with the SQLAlchemy dialect. To get an idea about the relevant traffic, let us enumerate the whole stack of requests and improvements already queuing up.
In particular, that patch demonstrates that the HTTP driver is not necessarily tied to the SQLAlchemy dialect, and vice versa. In this spirit, we decided to split concerns between those two artefacts, by separating them into two different repositories. Let us know about any further questions you may have on this topic. |
The CrateDB SQLAlchemy dialect needs more love, so it was separated from the Python DB API HTTP driver.
0935189
to
afe9206
Compare
afe9206
to
aef7f2d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi. We just refreshed this PR, bumping the dependency spec to use the most recent sqlalchemy-cratedb package, and updating the corresponding documentation section about CrateDB.
#### CrateDB | ||
|
||
The recommended connector library for CrateDB is | ||
[crate](https://pypi.org/project/crate/). | ||
You need to install the extras as well for this library. | ||
We recommend adding something like the following | ||
text to your requirements file: | ||
|
||
The connector library for CrateDB is [sqlalchemy-cratedb]. | ||
We recommend to add the following item to your `requirements.txt` file: | ||
``` | ||
crate[sqlalchemy]==0.26.0 | ||
sqlalchemy-cratedb>=0.40.1,<1 | ||
``` | ||
|
||
The expected connection string is formatted as follows: | ||
|
||
An SQLAlchemy connection string for [CrateDB Self-Managed] on localhost, | ||
for evaluation purposes, looks like this: | ||
``` | ||
crate://crate@127.0.0.1:4200 | ||
``` | ||
An SQLAlchemy connection string for connecting to [CrateDB Cloud] looks like | ||
this: | ||
``` | ||
crate://<username>:<password>@<clustername>.cratedb.net:4200/?ssl=true | ||
``` | ||
|
||
Follow the steps [here](/docs/configuration/databases#installing-database-drivers) | ||
to install the CrateDB connector package when setting up Superset locally using | ||
Docker Compose. | ||
``` | ||
echo "sqlalchemy-cratedb" >> ./docker/requirements-local.txt | ||
``` | ||
|
||
[CrateDB Cloud]: https://cratedb.com/product/cloud | ||
[CrateDB Self-Managed]: https://cratedb.com/product/self-managed | ||
[sqlalchemy-cratedb]: https://pypi.org/project/sqlalchemy-cratedb/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi. While being at it, refreshing the canonical dependencies for the CrateDB connector, we took the chance to also update the relevant documentation section. We hope you agree with those minor updates being slapped into the same PR per aef7f2d.
@hlcianfagna, @proddata, @simonprickett, @kneth: Please also have a look at those updates, and suggest any improvements that come to mind. See GitHub-rendered preview.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the detailed context on the evolution of the driver/dialect.
Hi. Thanks for merging. We also just updated the canonical migration page on our documentation. This page educates about the package switchover, not specifically related to Apache Superset. |
Thanks for all the work @amotl , this is definitely open source at it's finest ❤️ |
Thanks for all your excellent work on Superset! 💯 |
SUMMARY
sqlalchemy-cratedb
, which has been validated on a few other downstream packages already.Personal Message
Dear Superset maintainers, first things first: Thanks a stack for conceiving and maintaining Apache Superset, you know who you are. Hereby, we are submitting a little update about the database adapter of CrateDB. With kind regards, Andreas.
May we ask you to approve running the software tests on this draft PR, so we can get an impression if anything breaks?
/cc @hammerhead, @hlcianfagna, @surister