-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Writing A Driver
See the updated official docs: https://www.metabase.com/docs/latest/developers-guide/drivers/start.html
So here's the scenario: you love Metabase. It's changed your life. But you have some data in Visual Fox Pro '98 database and you need to make charts with it, and it might be a while before the core Metabase team writes a driver for you. No problem! Writing one yourself is easy, and might even be fun, as this guide will hopefully show you.
IMPORTANT NOTE: Metabase driver architecture has changed significantly for the 0.32 release as part of a project to make it truly possible to ship 3rd party drivers as separate plugins. Make sure you're developing your driver against 0.32.0 or above to ensure future compatibility.
IMPORTANT NOTE 2: This guide is somewhat incomplete, and depending on community demand I will spend more time finishing it up.
IMPORTANT NOTE 3: Please don't skip right to whichever chapter you think will give you code to copy-pasta to write your driver. While Metabase drivers are often fairly small (some as little as 50 lines of code), it takes a lot of careful thought to decide what goes into those 50 lines. Take the time to learn how Metabase drivers work before trying to write one, and writing one will be much easier.
This guide is broken out into several chapters, listed below. You should start by reading them in order, and skip over ones that aren't applicable (for example, you can skip the chapter about writing JDBC drivers if your database doesn't support JDBC.)
- Chapter 1: The Basics
- Chapter 2: Packaging a Driver & Metabase Plugin Basics
- Chapter 3: Implementing
metabase.driver
methods - Chapter 4: A Sample Driver
- Chapter 5: Writing Drivers for SQL-Based Databases
- Chapter 6: A Sample SQL Driver
- Chapter 7: Writing Drivers for SQL-Based Databases that have a JDBC Driver
- Chapter 8: A Sample SQL JDBC Driver
- Chapter 9: Adding Test Extensions, Tests, and Setting up CI
- Chapter 10: Publishing a Driver
- Backend
- Metabase Developer Reference
- Product Management
- QA and Testing
- Writing A Driver
- Driver Notices
- REST API Notices
- Writing style guide for documentation and blog posts (WIP)