Credits: This repository is only an updated version of the work of Fernando Goncalves and Rajesh Kumar Ravi.
To build a dockerized Metabase including the Databricks driver from this repository, simply run:
docker build -t metabase:0.46.6.2-databricks -f Dockerfile .
The Metabase Databricks driver gets build and included in a final Metabase docker image.
To run the tests for this driver, run the following:
docker build -t metabase/databricks-test --target stg_test .
docker run --rm --name mb-test metabase/databricks-test
or, if you have Clojure on your local machine, just:
clojure -X:test
- Display Name: a identification name for your database in Metabase
- Host: your Databricks URL (adb-XXXXXXXXX.azuredatabricks.net)
- Databricks client id: The id of your service-principal
- Databricks OAuth Secret: Your OAuth2 secret for the service-principal
- HTTP Path: The path to the SQL Warehouse, usually
/sql/1.0/endpoints/***
- Catalog : The name of the catalog you want to connect to
- Schema : If you want to restrict the connection to a specific database / schema
- Port : 443 by default, located in advanced settings
- Additional JDBC connection string options (SSL, transportMode etc...), located in advanced settings
Use the Dockerfile
on this repo:
docker build -t metabase:0.46.6.2-databricks .
This image contains both the original and updated driver versions
And you can deploy to some docker registry of your own and use the image!
Example of running:
docker run -d -p 3000:3000 --name metabase metabase:0.46.6.2-databricks
And access http://localhost:3000
.
Clone the Metabase repo first if you haven't already done so.
cd /path/to/metabase/
./bin/build
# (In the sparksql-databricks driver directory)
clojure -X:build :project-dir "\"$(pwd)\""
mkdir -p /path/to/metabase/plugins/
cp target/sparksql-databricks.metabase-driver.jar /path/to/metabase/plugins/
jar -jar /path/to/metabase/metabase.jar
or:
mkdir -p /path/to/metabase/plugins
cp target/sparksql-databricks.metabase-driver.jar /path/to/metabase/plugins/
cd /path/to/metabase_source
lein run