Skip to main content

Superset & Preset

Apache Superset is a powerful, open-source data exploration and visualization platform designed to be intuitive and interactive. It allows data professionals to quickly integrate and analyze data from various sources, creating insightful dashboards and charts for better decision making.

Preset is a cloud-native, user-friendly platform built on Apache Superset. It offers enhanced capabilities and managed services to leverage the power of Superset without needing to handle installation and maintenance.

In this guide, we'll cover how you can use MotherDuck with either Superset or Preset.

Superset

Setup

The easy way to get started locally with Superset is to use their docker-compose configurations.

Adding a database connection to MotherDuck

To make it work with DuckDB & MotherDuck, you will have to install an extra Python package, the DuckDB SQLAlchemy driver duckdb-engine.

You can follow the steps here to install additional packages before launching the docker-compose. Once done, you can now add the database connection.

  1. Head over to "Settings" and click on "Database Connections"

setting

  1. Click on "+ Database"

adddb

  1. In the Dropdown, pick "DuckDB"

addduckdb1

note

If DuckDB isn't listed, there's probably an error in the installation of the duckdb-engine. Review the installation steps to install this extra python package.

  1. Enter the SQLAlchemy URI to MotherDuck that follows this pattern :
duckdb:///md:<my_database>?motherduck_token=<my_token>

sqlalchemy

info

Database name is optional, so you can have one connection to MotherDuck and query multiple databases.

Finally, you can test your token/connection is valid by clicking "Test connection" and click "Connect".

Now your MotherDuck database is available in Superset and you can start making some dashboards!

Preset

Setup

You can register a Preset account for free (up to 5 users). Upon your account creation, you will need to create a workspace and be prompt to connect to your data source.

Adding a database connection to MotherDuck

In Preset, you don't need to do any extra work as the DuckDB SQLAlchemy driver is already installed and ready for you to select.

Following the exact same steps than with Superset:

  1. Add a database connection by going to "Settings", then "Database Connections"

settingspreset

  1. Click on "+ Database"

  2. In the Dropdown, pick "DuckDB"

addduckdb2

  1. Enter the SQLAlchemy URI to MotherDuck that follows this pattern :
duckdb:///md:<my_database>?motherduck_token=<my_token>

sqlalchemy2

Finally, you can test your token/connection is valid by clicking "Test connection" and click "Connect".

Now your MotherDuck database is available in Preset and you can start making some dashboards!

info

Database name is optional, so you can have one connection to MotherDuck and query multiple databases.