Skip to main content

Connect to MotherDuck

Securely connect your Hex workspace to your MotherDuck database.

info
  • Users need the Admin workspace role to create a shared workspace data connection.
  • Users need Can Edit or higher project permissions to create project data connections.

MotherDuck is a serverless analytics platform built on DuckDB. It combines DuckDB's exceptional speed for analytical queries with cloud-based storage and compute, allowing you to run analytics on data in cloud object storage (S3, GCS) or MotherDuck's managed storage. The key advantage is inheriting DuckDB's performance and rich SQL features while adding collaboration capabilities and automatic scaling without managing infrastructure.

MotherDuck is ideal for ad-hoc analysis and data exploration on moderately sized datasets (up to several terabytes) at lower cost than traditional cloud warehouses. It's best suited for analytical workloads, not high-concurrency transactions or real-time data ingestion at scale.

How to get set up

  1. Create a free MotherDuck account if you don't already have one.
  2. Generate a MotherDuck access token (instructions to generate).
  3. In Hex, go to SettingsData sources.
  4. Click + Connection, select MotherDuck, and fill out the fields below.

Basic settings

  1. Name and Description - Set a display name and optional description to help identify your data connection.
  2. MotherDuck Token - Your MotherDuck access token (instructions to generate).
  3. Default database (optional) - This allows you to query schemas and tables from Hex without needing to type the default database name in your SQL query.
MotherDuck data connection form

Additional settings

The data connection form includes several optional sections:

tip

If you use a firewall to restrict database access, you'll need to add Hex's IP addresses to your allowlist.