Skip to content

curefit/metabase-driver

 
 

Repository files navigation

Metabase Starburst Driver

Driver Plugin Installation

The Starburst Driver .jar binary can be downloaded from our releases in github. Once it is downloaded, it must be stored in the plugins directory within the Metabase working dir. See: https://www.metabase.com/docs/latest/developers-guide-drivers.html#how-to-use-a-third-party-driver

App Supported Versions

Please see supported versions for this release.

Developers Guide Drivers

Our build scripts will git clone the Metabase repo to ./metabase and copy all Starburst driver files into the expected folder: ./metabase/modules/drivers/starburst. From here, we leverage the Metabase build scripts to build our .jar file into the correct dir, run tests, and start the local server.

Prerequisites

Quick Start

Run make build test to build and run tests locally. If everything passes, you're good to go!

Building

Run make build to clone the Metabase repo and build all required components. This command should not need to be run again unless you manually git pull new changes into your local Metabase repo.

Force Updating Metabase Repo

You can manually run git commands to update the cloned Metabase repo, but if you want to remove the local Metabase repo and re-clone with the latest changes, make clean

Starting Local Server

Once you have built all required resources with the make build command, run make server. This command starts a local Metabase server on port 3000. If you want to build the driver and then start a server, run make driver server.

Testing Driver

Once you have built all required resources with the make build command, run make test. This command builds your local driver changes and then starts Starburst driver tests.

Staring a Trino Server in Docker

Running make test will start a Trino server for you on port 8082 when needed, but if you want to start one, you can run make start_trino_if_missing.

Note: Running make test will populate the Trino catalogs with mock data that is used for testing. You can then connect Metabase to this Trino server to view that data. This is useful for manual testing.

Executing Specific Tests

You can cd into the metabase repo and run commands like: DRIVERS=starburst clojure -X:dev:drivers:drivers-dev:test :only metabase.query-processor-test.timezones-test/filter-test

or even

DRIVERS=starburst clojure -X:dev:drivers:drivers-dev:test :only metabase.query-processor-test.timezones-test

Releasing Driver

To create a release from the main branch follow the below steps.

1.) Create a Release Branch

Head to actions and run the Create Release Branch workflow entering in the correct semantic version, and submit the workflow. This will create a new PR that contains promoted CHANGELOG.md and updated version info. Review the PR and merge once checks pass.

2.) Create the Release Artifact

Head to actions and run the Release workflow entering the same the same semantic version, and submit the release workflow. When this workflow completes, it will create a new tagged github release with the provided version and upload the .jar binary for clients to consume.

Update Metabase Version

If needed, make checkout_latest_metabase_tag will update Metabase to its latest tagged release.

References

Contact

For feature requests and bugs, please create an issue in this repo. For further support, see the following resources:

Packages

No packages published

Languages

  • Clojure 93.7%
  • Makefile 3.9%
  • Shell 1.5%
  • Dockerfile 0.9%