Apache Pinot driver for the Metabase business intelligence front-end
This repository contains the Apache Pinot driver for Metabase, allowing you to connect Metabase to Apache Pinot databases for data analysis and visualization.
Integrate Apache Pinot with Metabase
- Connect to Apache Pinot databases via HTTP API
- Support for authentication (Basic and Bearer tokens)
- Query options configuration
- SSH tunnel support
- Full MBQL to Pinot SQL translation
- Support for aggregations, filters, grouping, and ordering
- Git
- Docker
- Java 17
- Clojure 1.12.1.1550
- NodeJS 22
- NPM 10
- Yarn 1.22
- Apache Pinot 1.3.0
- Metabase v0.55.7
-
Clone this repository:
git clone https://github.com/startreedata/metabase-pinot-driver.git cd metabase-pinot-driver -
Build the driver:
make build
-
Start Metabase with the Pinot driver:
make server
- Controller endpoint: The URL of your Pinot controller (e.g.,
http://localhost:9000) - Database name: Optional database name for multi-tenant setups
- Authentication: Optional Basic or Bearer token authentication
- Query options: Optional semicolon-separated query options (e.g.,
timeoutMs=10000;useMultistageEngine=false)
controller-endpoint: http://localhost:9000
database-name: my_database
auth-enabled: true
auth-token-type: Bearer
auth-token-value: your-token-here
query-options: timeoutMs=10000;useMultistageEngine=falsemetabase-pinot-driver/
├── drivers/pinot/
│ ├── src/metabase/driver/pinot/
│ │ ├── pinot.clj # Main driver file
│ │ ├── client.clj # HTTP client for Pinot API
│ │ ├── execute.clj # Query execution
│ │ ├── query_processor.clj # MBQL to SQL translation
│ │ └── sync.clj # Database and table sync
│ ├── resources/
│ │ └── metabase-plugin.yaml # Driver configuration
│ └── deps.edn # Dependencies
├── Makefile # Build automation
├── app_versions.json # Version configuration
└── package.json # Node.js dependencies
# Build the driver
make driver
# Build everything (Metabase + driver)
make build
# Run tests
make testThe driver includes comprehensive tests. To run them:
make testThis will:
- Start a Pinot instance (if not already running)
- Link the driver to Metabase
- Run the test suite
The following behaviors were manually verified for variable substitution (SQL parameters: https://www.metabase.com/docs/latest/questions/native-editor/sql-parameters) in Metabase with the Pinot driver:
| Variable type | Filter widget | Result | Notes |
|---|---|---|---|
| Number | Dropdown list (custom or from another model/question) | Pass | |
| Number | Search box (custom only) | Pass | Multiple selections are allowed. Use IN for multi-select; = only works for a single value. IN works for both single and multiple values. |
| Number | Input box | Pass | |
| Text | Input box | Pass | |
| Text | Search box (custom or from another model/question) | Pass | |
| Text | Dropdown list (custom or from another model/question) | Pass | |
| Date | Input box (only option available) | Pass | |
| Field Filter | Location is (== or IN for multiple values) |
Pass | Do not include the column name in SQL. Map the variable to a field in the side panel. Example: SELECT count(*) FROM products WHERE 1=1 [[AND {{category}}]] |
| Field Filter | Location is not (!= or NOT IN for multiple values) |
Pass | |
| Field Filter | Location contains (LIKE %val%) |
Pass | For multiple values, use LIKE with OR across values. |
| Field Filter | Location does not contain (NOT LIKE %val%) |
Pass | For multiple values, use NOT LIKE with OR across values. |
| Field Filter | Location starts with (LIKE val%) |
Pass | For multiple values, use LIKE with OR across values. |
| Field Filter | Location ends with (LIKE %val) |
Pass | For multiple values, use LIKE with OR across values. |
This project uses GitHub Actions for automated releases. There are two ways to create a release:
- Go to the Actions tab
- Select the "Release" workflow
- Click "Run workflow"
- Fill in the required parameters:
- Version: Semantic version (e.g.,
1.0.0,1.0.0-alpha.1) - Commit SHA: The full commit SHA to release from
- Prerelease: Check if this is a prerelease
- Version: Semantic version (e.g.,
Use the provided release script for a more convenient CLI experience:
# Basic release
./scripts/release.sh 1.0.0 abc123def456...
# Prerelease
./scripts/release.sh --prerelease 1.0.0-alpha.1 abc123def456...
# Get help
./scripts/release.sh --helpPrerequisites for the script:
- GitHub CLI installed and authenticated
- Permissions to create releases on the repository
The release workflow will:
- Validate the version format and commit SHA
- Build the Pinot driver JAR
- Create release artifacts with checksums
- Generate release notes
- Create a GitHub release with the artifacts attached
Each release includes:
pinot.metabase-driver-v{version}.jar- The driver JAR filepinot.metabase-driver-v{version}.jar.sha256- SHA256 checksum- Automatically generated release notes
- Download the driver JAR from the releases page
- Place it in your Metabase
pluginsdirectory - Restart Metabase
- The Pinot driver will be available for database connections
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Submit a pull request
This project is licensed under the Apache License, Version 2.0. See the LICENSE file for details.
For issues and questions:
- Create an issue on GitHub
- Check the Apache Pinot documentation
- Check the Metabase documentation