From 5119132317f120fe349edb3d05b5735f919a2ce9 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Thu, 13 Jun 2024 20:26:00 +0200 Subject: [PATCH 1/2] chore(deps): Migrate from `crate[sqlalchemy]` to `sqlalchemy-cratedb` The CrateDB SQLAlchemy dialect needs more love, so it was separated from the Python DB API HTTP driver. --- docs/docs/configuration/databases.mdx | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/configuration/databases.mdx b/docs/docs/configuration/databases.mdx index 49c9417df862..3af3413870e7 100644 --- a/docs/docs/configuration/databases.mdx +++ b/docs/docs/configuration/databases.mdx @@ -401,7 +401,7 @@ We recommend adding something like the following text to your requirements file: ``` -crate[sqlalchemy]==0.26.0 +sqlalchemy-cratedb>=0.40.1,<1 ``` The expected connection string is formatted as follows: diff --git a/pyproject.toml b/pyproject.toml index 551e12bc1ea4..32f53a025d59 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -112,7 +112,7 @@ bigquery = [ clickhouse = ["clickhouse-connect>=0.5.14, <1.0"] cockroachdb = ["cockroachdb>=0.3.5, <0.4"] cors = ["flask-cors>=2.0.0"] -crate = ["crate[sqlalchemy]>=0.26.0, <0.27"] +crate = ["sqlalchemy-cratedb>=0.40.1, <1"] databend = ["databend-sqlalchemy>=0.3.2, <1.0"] databricks = [ "databricks-sql-connector>=2.0.2, <3", From aef7f2dd1ff8853642eda2fdd3e5bbae4277f142 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Fri, 15 Nov 2024 17:23:56 +0100 Subject: [PATCH 2/2] chore(docs): Update documentation section about CrateDB configuration --- docs/docs/configuration/databases.mdx | 28 +++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/docs/docs/configuration/databases.mdx b/docs/docs/configuration/databases.mdx index 3af3413870e7..316c5e747a7e 100644 --- a/docs/docs/configuration/databases.mdx +++ b/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: ``` 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://:@.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/ #### Databend