You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "amotl (via GitHub)" <gi...@apache.org> on 2024/06/13 18:30:37 UTC

[PR] chore(deps): Migrate from `crate[sqlalchemy]` to `sqlalchemy-cratedb` [superset]

amotl opened a new pull request, #29243:
URL: https://github.com/apache/superset/pull/29243

   <!---
   Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/
   Example:
   fix(dashboard): load charts correctly
   -->
   
   ### SUMMARY
   - The CrateDB SQLAlchemy dialect needs more love, so it was separated from the DBAPI HTTP driver.
   - This patch concludes the update to the new designated CrateDB SQLAlchemy dialect package, [`sqlalchemy-cratedb`](https://pypi.org/project/sqlalchemy-cratedb/), which has been validated on a few other downstream packages already.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] chore(deps): Migrate from `crate[sqlalchemy]` to `sqlalchemy-cratedb` [superset]

Posted by "villebro (via GitHub)" <gi...@apache.org>.
villebro merged PR #29243:
URL: https://github.com/apache/superset/pull/29243


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] chore(deps): Migrate from `crate[sqlalchemy]` to `sqlalchemy-cratedb` [superset]

Posted by "amotl (via GitHub)" <gi...@apache.org>.
amotl commented on code in PR #29243:
URL: https://github.com/apache/superset/pull/29243#discussion_r1844141083


##########
docs/docs/configuration/databases.mdx:
##########
@@ -394,21 +394,33 @@ couchbase://{username}:{password}@{hostname}:{port}?truststorepath={certificate
 
 #### 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/

Review Comment:
   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 aef7f2dd1ff.
   
   @hlcianfagna, @proddata, @simonprickett, @kneth: Please also have a look at those updates, and suggest any improvements that come to mind. See [GitHub-rendered preview](https://github.com/apache/superset/blob/aef7f2dd1ff8853642eda2fdd3e5bbae4277f142/docs/docs/configuration/databases.mdx#cratedb).
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] chore(deps): Migrate from `crate[sqlalchemy]` to `sqlalchemy-cratedb` [superset]

Posted by "amotl (via GitHub)" <gi...@apache.org>.
amotl commented on PR #29243:
URL: https://github.com/apache/superset/pull/29243#issuecomment-2168741417

   Hi @john-bodley. Thanks for asking.
   
   > What was the main reason for splitting this work out, i.e., why isn't it viable to simply update the SQLAlchemy dialect for the former?
   
   The Python DBAPI 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.
   
   - https://github.com/crate/crate-python/issues?q=is%3Aissue+is%3Aopen+sqlalchemy
   - https://github.com/crate/sqlalchemy-cratedb/pulls
   
   In particular, that patch demonstrates that the HTTP driver is not necessarily tied to the SQLAlchemy dialect, and vice versa.
   
   - https://github.com/crate/sqlalchemy-cratedb/pull/11
   
   In this spirit, we decided to split concerns between those two artefacts, by separating them into two different repositories.
   Currently, the SQLAlchemy dialect still exclusively uses the HTTP driver, but it will give users a choice after the aforementioned patch has been integrated.
   
   Let us know about any further questions you may have on this topic.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] chore(deps): Migrate from `crate[sqlalchemy]` to `sqlalchemy-cratedb` [superset]

Posted by "amotl (via GitHub)" <gi...@apache.org>.
amotl commented on PR #29243:
URL: https://github.com/apache/superset/pull/29243#issuecomment-2479981193

   Thanks for all your excellent work on Superset! 💯 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] chore(deps): Migrate from `crate[sqlalchemy]` to `sqlalchemy-cratedb` [superset]

Posted by "amotl (via GitHub)" <gi...@apache.org>.
amotl commented on PR #29243:
URL: https://github.com/apache/superset/pull/29243#issuecomment-2479956142

   Hi. Thanks for merging. We also just updated the canonical migration page on our documentation.
   
   - https://cratedb.com/docs/sqlalchemy-cratedb/migrate-from-crate-client.html
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] chore(deps): Migrate from `crate[sqlalchemy]` to `sqlalchemy-cratedb` [superset]

Posted by "villebro (via GitHub)" <gi...@apache.org>.
villebro commented on PR #29243:
URL: https://github.com/apache/superset/pull/29243#issuecomment-2479960556

   Thanks for all the work @amotl , this is definitely open source at it's finest ❤️ 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] chore(deps): Migrate from `crate[sqlalchemy]` to `sqlalchemy-cratedb` [superset]

Posted by "amotl (via GitHub)" <gi...@apache.org>.
amotl commented on code in PR #29243:
URL: https://github.com/apache/superset/pull/29243#discussion_r1844141083


##########
docs/docs/configuration/databases.mdx:
##########
@@ -394,21 +394,33 @@ couchbase://{username}:{password}@{hostname}:{port}?truststorepath={certificate
 
 #### 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/

Review Comment:
   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 aef7f2dd1ff.
   
   @hlcianfagna, @proddata, @kneth: Please also have a look at those updates, and suggest any improvements that come to mind.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] chore(deps): Migrate from `crate[sqlalchemy]` to `sqlalchemy-cratedb` [superset]

Posted by "amotl (via GitHub)" <gi...@apache.org>.
amotl commented on code in PR #29243:
URL: https://github.com/apache/superset/pull/29243#discussion_r1844141083


##########
docs/docs/configuration/databases.mdx:
##########
@@ -394,21 +394,33 @@ couchbase://{username}:{password}@{hostname}:{port}?truststorepath={certificate
 
 #### 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/

Review Comment:
   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 aef7f2dd1ff.
   
   @hlcianfagna, @proddata, @kneth: Please also have a look at those updates, and suggest any improvements that come to mind. See [GitHub-rendered preview](https://github.com/apache/superset/blob/aef7f2dd1ff8853642eda2fdd3e5bbae4277f142/docs/docs/configuration/databases.mdx#cratedb).
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] chore(deps): Migrate from `crate[sqlalchemy]` to `sqlalchemy-cratedb` [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #29243:
URL: https://github.com/apache/superset/pull/29243#issuecomment-2168329024

   Thanks for the PR! We very much appreciate it :) Running CI. 🤞 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] chore(deps): Migrate from `crate[sqlalchemy]` to `sqlalchemy-cratedb` [superset]

Posted by "john-bodley (via GitHub)" <gi...@apache.org>.
john-bodley commented on PR #29243:
URL: https://github.com/apache/superset/pull/29243#issuecomment-2168460842

   @amotl it seems likely you've contributed to both the `crate` SQLAlchemy dialect and `sqlalchemy-cratedb`—serving as the main author for the later. What was the main reason for splitting this work out, i.e., why isn't it viable to simply update the SQLAlchemy dialect for the former?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org