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.
- 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/your-username/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=false
metabase-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 test
The driver includes comprehensive tests. To run them:
make test
This will:
- Start a Pinot instance (if not already running)
- Link the driver to Metabase
- Run the test suite
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 --help
Prerequisites 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
plugins
directory - 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