ClickHouse (GitHub) database driver for the Metabase (GitHub) business intelligence front-end.
The driver aims to support the current stable and LTS releases (see the related docs).
After 1.50.1:
ClickHouse version | Supported? |
---|---|
23.8+ | ✔ |
23.6 - 23.7 | Best effort |
1.50.0 and earlier:
ClickHouse version | Supported? |
---|---|
23.8+ | ✔ |
23.3 - 23.7 | Best effort |
For connection impersonation feature, the minimal required ClickHouse version is 24.4; otherwise, the feature is disabled by the driver.
The CSV Uploads feature currently works only with ClickHouse Cloud (see this issue for more details).
metabase.jar
to it.plugins
.plugins
directory.metabase.jar
lives.MB_PLUGINS_DIR=./plugins; java -jar metabase.jar
.For example (using Metabase v0.51.1.2 and ClickHouse driver 1.51.0):
export METABASE_VERSION=v0.51.1.2
export METABASE_CLICKHOUSE_DRIVER_VERSION=1.51.0
mkdir -p mb/plugins && cd mb
curl -o metabase.jar https://downloads.metabase.com/$METABASE_VERSION/metabase.jar
curl -L -o plugins/ch.jar https://github.com/ClickHouse/metabase-clickhouse-driver/releases/download/$METABASE_CLICKHOUSE_DRIVER_VERSION/clickhouse.metabase-driver.jar
MB_PLUGINS_DIR=./plugins; java -jar metabase.jar
Alternatively, if you don't want to run Metabase Jar, you can use a Docker image:
export METABASE_VERSION=v0.51.1.2
export METABASE_CLICKHOUSE_DRIVER_VERSION=1.51.0
mkdir -p mb/plugins && cd mb
curl -L -o plugins/ch.jar https://github.com/ClickHouse/metabase-clickhouse-driver/releases/download/$METABASE_CLICKHOUSE_DRIVER_VERSION/clickhouse.metabase-driver.jar
docker run -d -p 3000:3000 \
--mount type=bind,source=$PWD/plugins/ch.jar,destination=/plugins/clickhouse.jar \
metabase/metabase:$METABASE_DOCKER_VERSION
Metabase Release | Driver Version |
---|---|
0.33.x | 0.6 |
0.34.x | 0.7.0 |
0.35.x | 0.7.1 |
0.37.3 | 0.7.3 |
0.38.1+ | 0.7.5 |
0.41.2 | 0.8.0 |
0.41.3.1 | 0.8.1 |
0.42.x | 0.8.1 |
0.44.x | 0.9.1 |
0.45.x | 1.1.0 |
0.46.x | 1.1.7 |
0.47.x | 1.2.3 |
0.47.7+ | 1.2.5 |
0.48.x | 1.3.4 |
0.49.x | 1.4.0 |
0.49.14+ | 1.5.1 |
0.50.x | 1.50.7 |
0.51.x | 1.51.0 |
After Metabase 0.50.0, a new naming convention exists for the driver's releases. The new one is intended to reflect the Metabase version the driver is supposed to run on. For example, the driver version 1.50.0 means that it should be used with Metabase v0.50.x or Metabase EE 1.50.x only, and it is not guaranteed that this particular version of the driver can work with the previous or the following versions of Metabase.
You can use a convenience script build_docker_image.sh
, which takes three arguments: Metabase version, ClickHouse driver version, and the desired final Docker image tag.
./build_docker_image.sh v0.51.1.2 1.51.0 my-metabase-with-clickhouse:v0.0.1
where v0.51.1.2
is Metabase version, 1.51.0
is ClickHouse driver version, and my-metabase-with-clickhouse:v0.0.1
being the tag.
Then you should be able to run it:
docker run -d -p 3000:3000 --name my-metabase my-metabase-with-clickhouse:v0.0.1
or use it with Docker compose, for example:
version: '3.8'
services:
clickhouse:
image: 'clickhouse/clickhouse-server:24.8-alpine'
container_name: 'metabase-clickhouse-server'
ports:
- '8123:8123'
- '9000:9000'
ulimits:
nofile:
soft: 262144
hard: 262144
metabase:
image: 'my-metabase-with-clickhouse:v0.0.1'
container_name: 'metabase-with-clickhouse'
environment:
'MB_HTTP_TIMEOUT': '5000'
# Replace with a timezone matching your ClickHouse or DateTime columns timezone
'JAVA_TIMEZONE': 'UTC'
ports:
- '3000:3000'
In the "Advanced options", add the following to the "Additional JDBC connection string options" input:
sslrootcert=/path/to/ca.crt
where /path/to/ca.crt
is the absolute path to the server CA on the Metabase host or Docker container (depends on your deployment).
Make sure that you tick "Use a secure connection (SSL)" as well.
The driver should work fine for many use cases. Please consider the following items when running a Metabase instance with this driver:
readonly
set to 2.clickhouse-client
.AggregateFunction
type, these columns are excluded from the table metadata and data browser result sets to prevent sync or data browsing errors.Check out our contributing guide.