mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
feat: use a new official CH driver: clickhouse-connect (#22039)
This commit is contained in:
@@ -10,33 +10,33 @@ version: 1
|
||||
To use ClickHouse with Superset, you will need to add the following Python library:
|
||||
|
||||
```
|
||||
clickhouse-sqlalchemy>=0.2.2
|
||||
clickhouse-connect>=0.4.1
|
||||
```
|
||||
|
||||
If running Superset using Docker Compose, add the following to your `./docker/requirements-local.txt` file:
|
||||
|
||||
```
|
||||
clickhouse-sqlalchemy>=0.2.2
|
||||
clickhouse-connect>=0.4.1
|
||||
```
|
||||
|
||||
The recommended connector library for ClickHouse is
|
||||
[sqlalchemy-clickhouse](https://github.com/cloudflare/sqlalchemy-clickhouse).
|
||||
[clickhouse-connect](https://github.com/ClickHouse/clickhouse-connect).
|
||||
|
||||
The expected connection string is formatted as follows:
|
||||
|
||||
```
|
||||
clickhouse+native://<user>:<password>@<host>:<port>/<database>[?options…]clickhouse://{username}:{password}@{hostname}:{port}/{database}
|
||||
clickhousedb://<user>:<password>@<host>:<port>/<database>[?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
|
||||
clickhousedb://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
|
||||
If you're using Clickhouse locally on your computer, you can get away with using a http protocol URL that
|
||||
uses the default user without a password (and doesn't encrypt the connection):
|
||||
|
||||
```
|
||||
clickhouse+native://localhost/default
|
||||
clickhousedb://localhost/default
|
||||
```
|
||||
|
||||
@@ -35,7 +35,7 @@ A list of some of the recommended packages.
|
||||
| [Ascend.io](/docs/databases/ascend) | `pip install impyla` | `ascend://{username}:{password}@{hostname}:{port}/{database}?auth_mechanism=PLAIN;use_ssl=true` |
|
||||
| [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 clickhouse-sqlalchemy` | `clickhouse+native://{username}:{password}@{hostname}:{port}/{database}` |
|
||||
| [ClickHouse](/docs/databases/clickhouse) | `pip install clickhouse-connect` | `clickhousedb://{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/` |
|
||||
|
||||
Reference in New Issue
Block a user