DuckDB support

I have this working now, and it's quite fast with early testing of my raw data. Now I need to bring dbt in to create my reporting tables in DuckDB like I have in Postgres.

I'm going to provide all the steps I followed in case someone else stumbles across this thread and needs some help.

I have not been able to successfully build my own version of the driver, but AlexR2D2 created a new version of the DuckDB driver here: Release metabase-v1.44.3-duckdb-jdbc-v0.5.1

It will let me connect to my DuckDB database (my_data.duckdb) created with duckdb.exe v0.5.2-dev318 (source Actions ยท duckdb/duckdb (github.com). If the version available here advances far enough to become incompatible with the DuckDB driver from AlexR2D2, you may need to open an issue in his GitHub repo to ask for a new release or build your own.

With a slight tweak to the Dockerfile provided by @tomsej, I'm including my DuckDB database (my_data.duckdb) in the image so it is all self-contained. At this point I could publish this on DockerHub and others could pull the image and use it as-is to explore the data.

FROM openjdk:19-buster

ENV MB_PLUGINS_DIR=/home/plugins/

ADD https://downloads.metabase.com/v0.44.4/metabase.jar /home

COPY plugins/duckdb.metabase-driver.jar /home/plugins/duckdb.metabase-driver.jar
RUN chmod 744 /home/plugins/duckdb.metabase-driver.jar

COPY my_data.duckdb /home/data/my_data.duckdb
RUN chmod 744 /home/data/my_data.duckdb

CMD ["java", "-jar", "/home/metabase.jar"]

Then build the image:
docker build . --tag metaduck:latest

Then create the container:
docker run --name metaduck -d -p 80:3000 -m 2GB -e MB_PLUGINS_DIR=/home/plugins metaduck
(This container is for testing DuckDB - for production, don't use the built-in H2 database for Metabase, use Postgres, MySQL or MariaDB instead.

Open Metabase in the browser: http://localhost

After creating your account, when asked to connect to your database select DuckDB, provide a name for the database and give it the path /home/data.my_data.duckdb.

That's it! You can now explore the data in your DuckDB database!