diff --git a/docs/src/pages/docs/Connecting to Databases/clickhouse.mdx b/docs/src/pages/docs/Connecting to Databases/clickhouse.mdx index d592362ca8..3b9aa776ae 100644 --- a/docs/src/pages/docs/Connecting to Databases/clickhouse.mdx +++ b/docs/src/pages/docs/Connecting to Databases/clickhouse.mdx @@ -8,11 +8,38 @@ version: 1 ## Clickhouse +To use Clickhouse with Superset, you will need to add the following Python libraries: + +``` +clickhouse-driver==0.2.0 +clickhouse-sqlalchemy==0.1.6 +``` + +If running Superset using Docker Compose, add the following to your `./docker/requirements-local.txt` file: + +``` +clickhouse-driver>=0.2.0 +clickhouse-sqlalchemy>=0.1.6 +``` + The recommended connector library for Clickhouse is [sqlalchemy-clickhouse](https://github.com/cloudflare/sqlalchemy-clickhouse). The expected connection string is formatted as follows: ``` -clickhouse://{username}:{password}@{hostname}:{port}/{database} +clickhouse+native://:@:/[?options…]clickhouse://{username}:{password}@{hostname}:{port}/{database} +``` + +Here's a concrete example of a real connection string: + +``` +clickhouse+native://demo:demo@github.demo.trial.altinity.cloud/default?secure=true +``` + +If you're using Clickhouse locally on your computer, you can get away with using a native protocol URL that +uses the default user without a password (and doesn't encrypt the connection): + +``` +clickhouse+native://localhost/default ``` diff --git a/docs/src/pages/docs/Connecting to Databases/index.mdx b/docs/src/pages/docs/Connecting to Databases/index.mdx index 18e7fed3d9..8bce3c2168 100644 --- a/docs/src/pages/docs/Connecting to Databases/index.mdx +++ b/docs/src/pages/docs/Connecting to Databases/index.mdx @@ -8,13 +8,16 @@ version: 1 ## Install Database Drivers -Superset requires a Python DB-API database driver and a SQLAlchemy dialect to be installed for each datastore you want to connect to. +Superset requires a Python DB-API database driver and a SQLAlchemy +dialect to be installed for each datastore you want to connect to. -You can read more [here](/docs/databases/dockeradddrivers) about how to install new database drivers into your Superset configuration. +You can read more [here](/docs/databases/dockeradddrivers) about how to +install new database drivers into your Superset configuration. ### Supported Databases and Dependencies -Superset does not ship bundled with connectivity to databases, except for SQLite, which is part of the Python standard library. You’ll need to install the required packages for the database you want to use as your metadata database as well as the packages needed to connect to the databases you want to access through Superset. +Superset does not ship bundled with connectivity to databases, except for SQLite, +which is part of the Python standard library. You’ll need to install the required packages for the database you want to use as your metadata database as well as the packages needed to connect to the databases you want to access through Superset. A list of some of the recommended packages. @@ -32,7 +35,7 @@ A list of some of the recommended packages. |[Apache Spark SQL](/docs/databases/spark-sql)|```pip install pyhive```|```hive://hive@{hostname}:{port}/{database}``` |[Azure MS SQL](/docs/databases/sql-server)|```pip install pymssql``` |```mssql+pymssql://UserName@presetSQL:TestPassword@presetSQL.database.windows.net:1433/TestSchema``` |[Big Query](/docs/databases/bigquery)|```pip install pybigquery```|```bigquery://{project_id}```| -|[ClickHouse](/docs/databases/clickhouse)|```pip install sqlalchemy-clickhouse```|```clickhouse://{username}:{password}@{hostname}:{port}/{database}```| +|[ClickHouse](/docs/databases/clickhouse)|```pip install clickhouse-driver==0.2.0 && pip install clickhouse-sqlalchemy==0.1.6```|```clickhouse+native://{username}:{password}@{hostname}:{port}/{database}```| |[CockroachDB](/docs/databases/cockroachdb)|```pip install cockroachdb```|```cockroachdb://root@{hostname}:{port}/{database}?sslmode=disable```| |[Dremio](/docs/databases/dremio)|```pip install sqlalchemy_dremio```|```dremio://user:pwd@host:31010/```| |[Elasticsearch](/docs/databases/elasticsearch)|```pip install elasticsearch-dbapi```|```elasticsearch+http://{user}:{password}@{host}:9200/```|