Custom Metabase driver for StarRocks with multi-catalog support
29
stars
20
commits
Clojure
primary language
Aug 28, 2026
updated
A community Metabase driver for StarRocks that fixes MySQL protocol compatibility issues and adds proper multi-catalog support.
Metabase's built-in MySQL driver doesn't work properly with StarRocks because:
SHOW GRANTS FOR CURRENT_USER is unsupported — StarRocks uses a different privilege system than MySQL, causing metadata sync to fail with:
No viable statement for input 'SHOW GRANTS FOR CURRENT_USER'
Multi-catalog support — StarRocks external catalogs (Hive, Iceberg, etc.) require catalog.database format which the MySQL driver doesn't handle well.
This driver extends Metabase's sql-jdbc driver directly, bypassing the problematic MySQL-specific code while maintaining full query compatibility.
Download the latest starrocks.metabase-driver-vX.X.X.jar from the Releases page.
# Install Clojure CLI (macOS)
brew install clojure/tools/clojure
# Clone and build
git clone https://github.com/Carbon-Arc/metabase-starrocks-driver.git
cd metabase-starrocks-driver
clojure -T:build uber
# Output: target/starrocks.metabase-driver.jar
Copy the JAR to your Metabase plugins directory:
# Docker
docker cp starrocks.metabase-driver.jar metabase:/plugins/
# Local installation
cp starrocks.metabase-driver.jar /path/to/metabase/plugins/
# Kubernetes
kubectl cp starrocks.metabase-driver.jar <namespace>/<pod>:/plugins/
Then restart Metabase to load the driver.
A single JAR supports every version in that range. Metabase adds and retires driver
multimethods between releases, and this plugin ships Clojure source that the host compiles
when it lazy-loads the driver — so a defmethod against a var the running Metabase does not
have is a compile-time failure that takes the whole plugin down, not a degraded feature.
Version-sensitive methods are therefore registered by capability probe at load time
(metabase.driver.starrocks.compat): the multimethod is resolved at runtime and the
implementation attached only if it exists. Probing is used rather than comparing version
numbers because Metabase Enterprise reports v1.x.y where OSS reports v0.x.y, dev builds
report vLOCAL_DEV, and additions can land in patch releases.
| Multimethod | Present in | Notes |
|---|---|---|
driver/describe-table-fks | 0.50–0.62 | Removed in 0.63 |
driver/describe-fks | 0.49+ | Replaces the above |
driver/describe-database* | 0.57+ | Preferred over describe-database where present. Metabase's own metadata says :added "0.56.3", but the var is absent from release-x.56.x and first ships in release-x.57.x |
sql.qp/transform-literal-like-pattern-honeysql | 0.59+ | Before 0.59 Metabase does not add ESCAPE '\', so no override is needed |
To adapt to a future Metabase release, add a row to version-sensitive-methods in
src/metabase/driver/starrocks.clj. clojure -X:test compiles the driver against a stub
Metabase of each shape and fails if any version-sensitive var is referenced literally.
| Field | Description | Example |
|---|---|---|
| Host | StarRocks FE hostname | starrocks-fe.example.com |
| Port | MySQL protocol port | 9030 |
| Catalog | StarRocks catalog name | default_catalog |
| Database | Database within catalog (optional) | my_database |
| Username | StarRocks user | admin |
| Password | User password | •••••••• |
default_cataloghive_catalogiceberg_catalogTip: Leave the Database field empty to see all databases in the catalog.
metabase-starrocks-driver/
├── deps.edn # Dependencies & build config
├── build.clj # Build script
├── src/metabase/driver/
│ └── starrocks.clj # Driver implementation
├── resources/
│ ├── metabase-plugin.yaml # Plugin manifest
│ └── metabase_driver/starrocks/
│ └── icon.svg # Driver icon
└── docs/
└── metabase-infrastructure.md # Deployment notes
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
src/metabase/driver/starrocks.cljclojure -T:build uberThis project uses semantic versioning. Releases are automated via GitHub Actions.
To create a new release:
git tag v1.0.0
git push origin v1.0.0
This triggers a workflow that builds the JAR and creates a GitHub release with the artifact attached (e.g., starrocks.metabase-driver-v1.0.0.jar).
SELECT privileges on the tablesSHOW GRANTS — if you see grant-related errors, ensure you're using this driver (not MySQL)This project is licensed under the Apache License 2.0 — see the LICENSE file for details.
Clojure
100.0%
Custom Metabase driver for StarRocks with multi-catalog support
29
stars
20
commits
Clojure
primary language
Aug 28, 2026
updated
A community Metabase driver for StarRocks that fixes MySQL protocol compatibility issues and adds proper multi-catalog support.
Metabase's built-in MySQL driver doesn't work properly with StarRocks because:
SHOW GRANTS FOR CURRENT_USER is unsupported — StarRocks uses a different privilege system than MySQL, causing metadata sync to fail with:
No viable statement for input 'SHOW GRANTS FOR CURRENT_USER'
Multi-catalog support — StarRocks external catalogs (Hive, Iceberg, etc.) require catalog.database format which the MySQL driver doesn't handle well.
This driver extends Metabase's sql-jdbc driver directly, bypassing the problematic MySQL-specific code while maintaining full query compatibility.
Download the latest starrocks.metabase-driver-vX.X.X.jar from the Releases page.
# Install Clojure CLI (macOS)
brew install clojure/tools/clojure
# Clone and build
git clone https://github.com/Carbon-Arc/metabase-starrocks-driver.git
cd metabase-starrocks-driver
clojure -T:build uber
# Output: target/starrocks.metabase-driver.jar
Copy the JAR to your Metabase plugins directory:
# Docker
docker cp starrocks.metabase-driver.jar metabase:/plugins/
# Local installation
cp starrocks.metabase-driver.jar /path/to/metabase/plugins/
# Kubernetes
kubectl cp starrocks.metabase-driver.jar <namespace>/<pod>:/plugins/
Then restart Metabase to load the driver.
A single JAR supports every version in that range. Metabase adds and retires driver
multimethods between releases, and this plugin ships Clojure source that the host compiles
when it lazy-loads the driver — so a defmethod against a var the running Metabase does not
have is a compile-time failure that takes the whole plugin down, not a degraded feature.
Version-sensitive methods are therefore registered by capability probe at load time
(metabase.driver.starrocks.compat): the multimethod is resolved at runtime and the
implementation attached only if it exists. Probing is used rather than comparing version
numbers because Metabase Enterprise reports v1.x.y where OSS reports v0.x.y, dev builds
report vLOCAL_DEV, and additions can land in patch releases.
| Multimethod | Present in | Notes |
|---|---|---|
driver/describe-table-fks | 0.50–0.62 | Removed in 0.63 |
driver/describe-fks | 0.49+ | Replaces the above |
driver/describe-database* | 0.57+ | Preferred over describe-database where present. Metabase's own metadata says :added "0.56.3", but the var is absent from release-x.56.x and first ships in release-x.57.x |
sql.qp/transform-literal-like-pattern-honeysql | 0.59+ | Before 0.59 Metabase does not add ESCAPE '\', so no override is needed |
To adapt to a future Metabase release, add a row to version-sensitive-methods in
src/metabase/driver/starrocks.clj. clojure -X:test compiles the driver against a stub
Metabase of each shape and fails if any version-sensitive var is referenced literally.
| Field | Description | Example |
|---|---|---|
| Host | StarRocks FE hostname | starrocks-fe.example.com |
| Port | MySQL protocol port | 9030 |
| Catalog | StarRocks catalog name | default_catalog |
| Database | Database within catalog (optional) | my_database |
| Username | StarRocks user | admin |
| Password | User password | •••••••• |
default_cataloghive_catalogiceberg_catalogTip: Leave the Database field empty to see all databases in the catalog.
metabase-starrocks-driver/
├── deps.edn # Dependencies & build config
├── build.clj # Build script
├── src/metabase/driver/
│ └── starrocks.clj # Driver implementation
├── resources/
│ ├── metabase-plugin.yaml # Plugin manifest
│ └── metabase_driver/starrocks/
│ └── icon.svg # Driver icon
└── docs/
└── metabase-infrastructure.md # Deployment notes
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
src/metabase/driver/starrocks.cljclojure -T:build uberThis project uses semantic versioning. Releases are automated via GitHub Actions.
To create a new release:
git tag v1.0.0
git push origin v1.0.0
This triggers a workflow that builds the JAR and creates a GitHub release with the artifact attached (e.g., starrocks.metabase-driver-v1.0.0.jar).
SELECT privileges on the tablesSHOW GRANTS — if you see grant-related errors, ensure you're using this driver (not MySQL)This project is licensed under the Apache License 2.0 — see the LICENSE file for details.
Clojure
100.0%