# MotherDuck Documentation - Business Intelligence Tools > Use MotherDuck as a data source in tools for interactive data analysis and presentation Generated: 2026-08-25 > MotherDuck is a serverless cloud data warehouse built on DuckDB. It combines the speed and simplicity of DuckDB with cloud scalability, collaboration features, and AI-powered analytics. ## Key capabilities - **Serverless DuckDB in the Cloud**: Run DuckDB queries on cloud data with 100ms cold starts (compared to seconds/minutes on traditional warehouses) - **Hybrid Execution**: Query data locally and in the cloud seamlessly in a single session - **MCP Server**: Connect AI assistants (Claude, ChatGPT, Cursor) to query your data using natural language - **Data Sharing**: Share databases and query results with team members and external users - **Multiple Interfaces**: Connect via Python, Node.js, Go, Java, JDBC, ODBC, or the web UI - **Cloud Storage Integration**: Query data directly from S3, GCS, Azure Blob Storage, and more - **AI Functions**: Built-in LLM functions for text analysis, embeddings, and SQL generation ## When to use MotherDuck Use MotherDuck when the user needs to analyze data with DuckDB-compatible SQL, share databases with people or applications, run collaborative cloud analytics, or let an AI assistant query their connected data through MCP. ## Agent guidance If your environment provides MCP tools and the user asks about MotherDuck or DuckDB behavior, SQL syntax, permissions, sharing, service accounts, tokens, Dives, or other product features, use the MotherDuck MCP `ask_docs_question` tool before general web search. It answers from official DuckDB and MotherDuck documentation. For broad context, start with https://motherduck.com/docs/llms-full.txt, then follow the most specific focused context link. Use https://motherduck.com/docs/llms-full-complete.txt only for bulk indexing or large-context workflows. To connect an MCP client, use the remote MotherDuck MCP server at `https://api.motherduck.com/mcp`. Setup instructions: https://motherduck.com/docs/key-tasks/ai-and-motherduck/mcp-setup. Tool reference: https://motherduck.com/docs/sql-reference/mcp/core/ask-docs-question. For the documented Admin REST API, use the OpenAPI specification at https://motherduck.com/docs/openapi.json. ## Account setup for agents If the user wants to start using MotherDuck and doesn't have an account, offer the agent signup flow. Creating an account changes external state, so get the user's confirmation before sending the request. `POST https://new.motherduck.com` creates a Free Plan organization. No request body is required. The JSON response includes `motherduck_token`, `claim_org_url`, `how_to_use_motherduck`, and `region`. Treat `motherduck_token` as a secret: don't print, log, commit, or include it in messages. Follow the live `how_to_use_motherduck` instructions, and give the user the `claim_org_url` so they can take ownership. Full guide: https://motherduck.com/docs/key-tasks/ai-and-motherduck/agent-account-signup. ## Child contexts - [Tableau full context](https://motherduck.com/docs/integrations/bi-tools/tableau/llms-full.txt): Tableau is a widely-used business intelligence and data visualization platform that enables data analysts to build interactive dashboards and reports. You can connect Tableau Cloud to MotherDuck through the built-in PostgreSQL connector using MotherDuck's Postgres endpoint. For Tableau Desktop and Server, use the DuckDB JDBC connector. (4 pages; 21,660 bytes; ~5,412 tokens). [Index](https://motherduck.com/docs/integrations/bi-tools/tableau/llms.txt). - [Microsoft Power BI full context](https://motherduck.com/docs/integrations/bi-tools/powerbi/llms-full.txt): Power BI is an interactive data visualization product developed by Microsoft. You can connect Power BI to MotherDuck through the built-in PostgreSQL database connector using MotherDuck's Postgres endpoint. (4 pages; 25,277 bytes; ~6,320 tokens). [Index](https://motherduck.com/docs/integrations/bi-tools/powerbi/llms.txt). ## Included documentation Source: https://motherduck.com/docs/integrations/bi-tools/hex # Hex > Connect Hex notebooks to MotherDuck using SQL data connections or Python cells for interactive analytics. [Hex](https://hex.tech/) is a software platform for collaborative data science and analytics using Python, SQL and no-code. You have two ways to connect to MotherDuck using Hex: - **Using SQL cells with a data connection**: MotherDuck is a supported [data connection in Hex](https://learn.hex.tech/docs/connect-to-data/data-connections/data-connections-introduction#supported-data-sources). - **Using Python cells**: You can use Python cells to connect to MotherDuck and query data using DuckDB. ## Using SQL cells with a data connection :::tip When many human users query through the same MotherDuck data connection, consider using a [read scaling token](/key-tasks/authenticating-and-connecting-to-motherduck/read-scaling/). Hex will then route the queries to a dedicated Duckling per Hex kernel, up to the maximum pool size configured for the account that owns the token. Every preset role can configure its own Duckling and read scaling pool. What this means in practice: * Each workbook will get a stable backend for each unique data connection. Multiple users collaborating on the same workbook will share the Duckling to query faster on warm data caches. * In a published app, each user will get a stable backend for each data connection to power their own unique exploration. ::: To add a new data connection, head over the Data browser in a new notebook and click on `Add data connection`. ![hex_data_browser](../img/hex_data_browser.png) Select `MotherDuck` as the data source and fill in the required fields. The most important is the MotherDuck token, which you can find in the [MotherDuck UI](/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck/#creating-an-access-token). ![hex_configuration](../img/hex_configuration.png) Once done, you can use the data browser to explore the tables and columns and directly specify your data connection in your SQL cell. ![hex_data_browser](../img/hex_data_browser_2.png) ![hex_sql_cell](../img/hex_sql_cell.png) ### Query some data Add another cell and run the same query we ran in a Python cell : ```sql SELECT dayname(tpep_pickup_datetime) AS day_of_week, strftime('%H', tpep_pickup_datetime) AS hour_of_day, COUNT(*) AS trip_count FROM sample_data.nyc.taxi GROUP BY day_of_week, hour_of_day ORDER BY day_of_week, hour_of_day; ``` This produces both a table and a Dataframe, which you can utilize in the same manner as we previously demonstrated with Python to generate data visualizations. ![hex_sql_result](../img/hex_sql_result.png) ## Using Python cells :::tip[Use Python 3.12 or later] When using Python cells in your environment to connect to MotherDuck, set your Hex project's Python version to 3.12 or later to ensure you have a compatible version of DuckDB pre-installed in your Hex environment. To change your Python version, go to **Settings** --> **Environment** and select **Python 3.12** or **Latest**. ::: If you prefer programming in Python, you can use Python cells to connect to MotherDuck and start query data. You can jump directly on the [Hex notebook](https://app.hex.tech/c0083b53-a04f-47b1-bff7-a9ff12590a9f/hex/5c85b3e2-3df7-4011-87a0-1fff63787d03/draft/logic) for a quickstart. The notebook highlight how you can query data using Python or SQL cells and display charts! ### Storing your MotherDuck token The first step is to safely store your MotherDuck token. You can do this by [creating a new secret in Hex.](https://learn.hex.tech/docs/environment-configuration/environment-views#secrets) ![Hex secrets](../img/hex_secrets.png) Let's add your [MotherDuck access token](/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck/authenticating-to-motherduck.md#authentication-using-an-access-token) under the name `motherduck_token`. ![Hex secrets2](../img/hex_secrets_2.png) Once done, add the next Python cell to export as environment variable your `motherduck_token`. This will be detected by SQL/Python processes when authenticating to MotherDuck. ```python # Passing the secrets as environment variable for Python/SQL cell auth # Fill in your token as a Hex project secret https://learn.hex.tech/docs/environment-configuration/environment-views#secret import os os.environ["motherduck_token"] = motherduck_token ``` ### Connecting to MotherDuck DuckDB is already pre-installed in the Hex environment, so you can connect to MotherDuck directly. Add a Python cell and run the following code: ![Hex add cell](../img/hex_add_cell.png) ```python import duckdb # Connect to MotherDuck using Python conn = duckdb.connect(f'md:') ``` ### Query some data and display a chart You can query data from the [sample_data database](/getting-started/sample-data-queries/datasets.mdx). The following example runs a query and returns the result as a pandas dataframe to display as a chart. This database is auto-attached to any MotherDuck user, so you can query it directly. Add another Python cell and run the following code: ```python # Query sample_data database and convert it to a pandas dataframe for dataviz peak_hours = conn.sql(""" SELECT dayname(tpep_pickup_datetime) AS day_of_week, strftime('%H', tpep_pickup_datetime) AS hour_of_day, COUNT(*) AS trip_count FROM sample_data.nyc.taxi GROUP BY day_of_week, hour_of_day ORDER BY day_of_week, hour_of_day;""").to_df() ``` Now we can display the chart using the Visualization cell. Add a new Visualization cell, type `Chart` and select the dataframe we just created `peak_hours`. ![Hex chart](../img/hex_chart_df.png) Finally, play with the parameters to obtain the following chart which gives you a weekly view of the peak hours in New York City for the yellow cabs. ![Hex chart peak hours](../img/hex_chart_peak_hours.png) --- Source: https://motherduck.com/docs/integrations/bi-tools/evidence # Evidence > Evidence is an open source, code-based alternative to drag-and-drop BI tools. Build polished data products with just SQL and markdown. ## Getting started Head over to [their installation page](https://docs.evidence.dev/getting-started/install-evidence) and start with their template to get you started. ## Authenticate to MotherDuck When using development, you can go manually through the UI, pick "settings". If you are running Evidence locally, typically at [http://localhost:3000/settings](http://localhost:3000/settings). ![img](../img/evidence_settings.png) Then select 'DuckDB' as a connection type, and as the filename, use `'md:?motherduck_token=xxxx'` where `xxx` is your [access token](/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck#authentication-using-an-access-token). Finally as extension, select "No extension". Click on `Save`. ![img](../img/evidence_duckdb.png) In production, you can set [some global environments](https://docs.evidence.dev/deployment/environments#prod-environment), you would have to set two environments variables: - `EVIDENCE_DUCKDB_FILENAME='md:?motherduck_token=xxxx'` - `EVIDENCE_DATABASE=duckdb` ## Displaying some data through SQL and markdown Once done, you can add a new page in the `pages` folder and add the following code blocks to `stackoverflow.md` file: First, add some Markdown headers. ```md --- title: Evidence & MotherDuck --- # Stories with most score ``` Then, we query our data from the [HackerNews sample_data database](/getting-started/sample-data-queries/hacker-news.md) in MotherDuck. The query is fetching the top stories (posts) from HackerNews. SELECT id, title, score, "by", strftime('%Y-%m-%d', to_timestamp(time)) AS date FROM sample_data.hn.hacker_news WHERE type = 'story' ORDER BY score DESC LIMIT 20; Finally, we use the reference of that query result `new_items` to create a list that would be generated in Markdown. The list contains the title (with the url of the story), the date, the score and the author of the story. ```md {#each new_items as item} * [{item.title}](https://news.ycombinator.com/item?id={item.id}) {item.date} ⬆ {item.score} by [{item.by}](https://news.ycombinator.com/user?id={item.by}) {/each} ``` Head over then to this page you created and you should see the final result that looks like this: ![img](../img/evidence_hackernews.png) --- Source: https://motherduck.com/docs/integrations/bi-tools/superset-preset # 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](https://preset.io/) 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. ## Self-hosted Superset ### Setup The easy way to get started locally with Superset is to use their [docker-compose configurations.](https://superset.apache.org/docs/installation/installing-superset-using-docker-compose/) ### Adding a database connection to MotherDuck To make it work with DuckDB & MotherDuck, you will have to install two extra Python packages in your local Superset environment: - DuckDB SQLAlchemy driver [duckdb-engine](https://github.com/Mause/duckdb_engine) - DuckDB [duckdb](https://github.com/duckdb/duckdb) 1. Clone the [Superset repository](https://github.com/apache/superset): ```bash git clone https://github.com/apache/superset.git ``` 2. Create a new file in `superset/docker/requirements-local.txt` and add the following packages: ```text duckdb-engine duckdb ``` 3. Build or run the docker container, depending whether this is the first time you run it or not, with the following command: ```bash # First time running it docker-compose up --build # Subsequent runs docker-compose up ``` 4. Once the container is running, you can access the Superset UI at [http://localhost:8088](http://localhost:8088) or at the address you specified in the `docker-compose.yml` file. 5. Once you are logged in, head over to "Settings" and click on "Database Connections", then click on "+ Database". ![Superset Settings menu showing Database Connections option](./img/superset-database-connections-menu.png) ![Superset Add Database button](./img/superset-add-database.png) 6. In the Dropdown, pick "MotherDuck", then enter the database name that you want to connect to and the MotherDuck token of the user or service account. :::note If MotherDuck isn't listed, there's probably an error in the installation of the `duckdb-engine`. Review the installation steps under (2) to install this extra python package. ::: :::info `Database name` is **optional**. Instead of specifying a database name, you can leave it empty to connect to all databases. ::: ![Superset dropdown showing MotherDuck option](./img/superset-select-motherduck.png) ![Superset MotherDuck connection form with database name and token fields](./img/superset-motherduck-connection.png) 7. 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 querying data and making some dashboards! ## Preset ### Setup You can register a Preset account for [free](https://preset.io/pricing/) (up to 5 users). Upon your account creation, you will need to create a workspace and be prompted to connect to your data source. ### Adding your first database connection to MotherDuck When you first setup Preset, you will be offered to create a connection to a database. Preset has a direct integration with MotherDuck, making the connection process simpler. 1. In the Database Connection Dropdown in "Connect your first database", select "MotherDuck" and enter your MotherDuck credentials and database information. :::note The Database Name needs to be prefixed with `md:` to connect to MotherDuck. The Access Token is the token you created in the [MotherDuck dashboard](https://app.motherduck.com). ::: ![Preset database connection dropdown with MotherDuck option](./img/preset-select-motherduck.png) ![Preset MotherDuck credentials form](./img/preset-motherduck-credentials.png) 2. Click "Connect" to verify your connection is valid. Now your MotherDuck database is available in Preset and you can start creating dashboards immediately! :::info You can connect to multiple databases using a single MotherDuck connection. ::: ### Adding additional database connections When adding more database connections to Preset, you can choose the option of "Get MotherDuck token". This generates a new token from the MotherDuck account you are logged into. 1. Add a database connection by going to "Settings", then "Database Connections". In the Database Connections page, click on "+ Database" in the top right corner. ![Preset Settings showing Database Connections page](./img/preset-database-connections-menu.png) ![Preset Add Database button](./img/preset-add-database.png) 2. In the dropdown, select "MotherDuck" (see above). 3. Enter your MotherDuck credentials and database information. Here you have the option to generate a new token using the `Get MotherDuck token` button or use a token you previously created. ![Preset MotherDuck credentials form with Get MotherDuck token option](./img/preset-motherduck-token.png) :::caution Given that usually BI tools such as Preset and Superset are connected to service accounts, we do not recommend the "Get MotherDuck token" option for production systems but only for testing. For production systems the recommended approach is to generate an access token for the dedicated service account using the MotherDuck REST API and connect this account to Preset instead. ::: ## Related content - [SQLAlchemy with DuckDB and MotherDuck](/docs/integrations/language-apis-and-drivers/python/sqlalchemy/) - [Authenticating to MotherDuck](/docs/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck/) - [Managing Service Accounts](/docs/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck/) --- Source: https://motherduck.com/docs/integrations/bi-tools/metabase # Metabase > Connect Metabase to MotherDuck through the Postgres endpoint on Metabase Cloud, or the DuckDB driver plugin on self-hosted instances. [Metabase](https://www.metabase.com/) is an open source analytics and BI platform for data visualization and exploration. Connect it to MotherDuck in one of two ways: - **[Metabase Cloud](#metabase-cloud)**: connect through the MotherDuck [Postgres endpoint](/key-tasks/authenticating-and-connecting-to-motherduck/postgres-endpoint). - **[Self-hosted Metabase](#self-hosted-metabase)**: install the DuckDB driver plugin, or connect through the Postgres endpoint. ## Metabase Cloud :::info[Preview] The [Postgres endpoint](/key-tasks/authenticating-and-connecting-to-motherduck/postgres-endpoint) is in [preview](/about-motherduck/feature-stages/). Features and behavior may change. ::: Metabase Cloud does not support installing custom drivers like the DuckDB plugin. Instead, connect Metabase Cloud to MotherDuck using the [Postgres endpoint](/key-tasks/authenticating-and-connecting-to-motherduck/postgres-endpoint). You must set two connection options so that Metabase syncs your schema correctly — see [Required connection options](#required-connection-options) below. ### Prerequisites - A Metabase Cloud instance with admin access - A [MotherDuck access token](/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck) ### Connect to MotherDuck 1. In Metabase, go to **Admin** > **Databases** and click **Add database** (or edit an existing connection). 2. Set the **Database type** to **PostgreSQL** and fill in the connection details: | Field | Value | |-------|-------| | **Display name** | MotherDuck (or any name you prefer) | | **Host** | Your MotherDuck Postgres host (for example, `pg.us-east-1-aws.motherduck.com`). Find yours at [MotherDuck Postgres settings](https://app.motherduck.com/settings/postgres). | | **Port** | `5432` | | **Database name** | Your MotherDuck database name | | **Username** | `postgres` | | **Password** | Your [MotherDuck access token](/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck) | 3. Scroll down and enable **Use a secure connection (SSL)**. 4. If you have a company or your own SSL certificate you can set **SSL Mode** to `verify-full` and use this. Otherwise, we'll use the Let's Encrypt certificate authority and set **SSL Mode** to `verify-ca`. 5. For the **SSL Root Certificate (PEM)**, select **Uploaded file path** and upload the [Let's Encrypt ISRG Root X1](https://letsencrypt.org/certs/isrgrootx1.pem) certificate (`isrgrootx1.pem`). ![Metabase connection details showing host, port, database name, username, and password fields](require('./img/metabase-connection-details.png').src) ![Metabase SSL settings showing verify-ca mode and isrgrootx1.pem certificate](require('./img/metabase-ssl-settings.png').src) 6. Click **Show advanced options**, then: - In **Additional JDBC connection string options**, paste the [required connection options](#required-connection-options) string. - Turn **off** **Allow unfolding of JSON columns** (see [JSON columns](#json-columns)). 7. Click **Save changes**. ![Metabase advanced options with the required connection string in Additional JDBC connection string options and Allow unfolding of JSON columns turned off](require('./img/metabase-advanced-options.png')) ### Required connection options In the **Additional JDBC connection string options** field, set: ```text options=-c%20attach_mode%3Dsingle%20-c%20compatibility_mode%3Dmetabase ``` This is a single `options=` value that passes two Postgres startup options to MotherDuck. It decodes to `-c attach_mode=single -c compatibility_mode=metabase`, where: - **`compatibility_mode=metabase`** makes MotherDuck return catalog metadata in the exact shape Metabase expects. Without it, Metabase's field-sync query fails on recent Metabase versions and tables sync with **no fields** ("Table has no Fields associated with it"). - **`attach_mode=single`** scopes the connection to the database you connect to, instead of every database in your account. This keeps schema-sync queries light and lets Metabase populate table row-count estimates. :::warning Enter the value **exactly as shown**, fully URL-encoded: `%20` for each space and `%3D` for each `=`. If you separate the two options with a literal space or `&`, or leave the inner `=` un-encoded, Metabase keeps only the first option and silently drops `attach_mode=single` during sync. ::: ### JSON columns Turn **off** **Allow unfolding of JSON columns** in the connection's advanced options. When unfolding is enabled, Metabase expands JSON columns into virtual fields and queries them with the PostgreSQL `#>>` path operator, which the Postgres endpoint does not support — those questions fail. With unfolding off, JSON columns sync as regular fields and everything else works. ### Known limitations Foreign-key relationships and indexes do not sync automatically over the Postgres endpoint, so the query builder's implicit (automatic) joins are unavailable. Tables, fields, types, primary keys, comments, and row counts all sync normally, and explicit joins in native SQL or the query builder work. To use relationships in the query builder, define them manually under **Admin** > **Table Metadata** by setting a field's type to **Foreign Key** and choosing its target. ### Troubleshooting | Symptom | Resolution | |---|---| | Tables sync but have **no fields** ("Table has no Fields associated with it") | Confirm `compatibility_mode=metabase` is present in **Additional JDBC connection string options**, and that the value is fully URL-encoded (`%20`/`%3D`) exactly as shown. Then re-sync the database schema. | | Schema browsing shows tables from other databases, or row counts are missing | Confirm `attach_mode=single` is present in the options string. It is silently dropped if the value uses a literal space or `&` between the options, or leaves the inner `=` un-encoded. | | A question on a JSON field fails to run | Turn off **Allow unfolding of JSON columns** and re-sync (see [JSON columns](#json-columns)). | | No relationships / implicit joins in the query builder | Expected — define foreign keys manually under **Admin** > **Table Metadata** (see [Known limitations](#known-limitations)). | ## Self-hosted Metabase Self-hosted Metabase can connect to MotherDuck in two ways: install the DuckDB driver plugin (described below), or connect through the [Postgres endpoint](/key-tasks/authenticating-and-connecting-to-motherduck/postgres-endpoint) using the same steps as [Metabase Cloud](#metabase-cloud). The DuckDB driver runs queries in Metabase's embedded DuckDB and also supports local DuckDB files and DuckLake; the Postgres endpoint routes queries to MotherDuck without a plugin. ### Prerequisites - Metabase installed (self-hosted) - Admin access to your Metabase instance - A [MotherDuck access token](/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck) ### Install the DuckDB driver ### Dockerfile (bundled plugin) 1. Create a `Dockerfile` that includes the latest Metabase plus the DuckDB driver: ```dockerfile FROM eclipse-temurin:21-jre ENV MB_PLUGINS_DIR=/plugins RUN mkdir -p ${MB_PLUGINS_DIR} /app # Latest Metabase ADD https://downloads.metabase.com/latest/metabase.jar /app/metabase.jar # Latest DuckDB driver ADD https://github.com/MotherDuck-Open-Source/metabase_duckdb_driver/releases/latest/download/duckdb.metabase-driver.jar ${MB_PLUGINS_DIR}/ EXPOSE 3000 CMD ["java", "-jar", "/app/metabase.jar"] ``` 2. Build and run: ```bash docker build -t metabase-duckdb:latest . docker run -d --name metaduck -p 3000:3000 -e MB_PLUGINS_DIR=/plugins metabase-duckdb:latest ``` Tip: For reproducible builds, pin versions instead of `latest`: ```dockerfile # Example of pinning versions (replace X.Y.Z) ADD https://downloads.metabase.com/vX.Y.Z/metabase.jar /app/metabase.jar ADD https://github.com/MotherDuck-Open-Source/metabase_duckdb_driver/releases/download/1.X.Y/duckdb.metabase-driver.jar ${MB_PLUGINS_DIR}/ ``` Note: Use a Debian/Ubuntu-based JRE image (not Alpine) to avoid glibc issues with the DuckDB driver. ### Manual 1. Download the latest DuckDB driver `.jar`: ```bash curl -L -o duckdb.metabase-driver.jar \ https://github.com/MotherDuck-Open-Source/metabase_duckdb_driver/releases/latest/download/duckdb.metabase-driver.jar ``` 1. Copy it to the Metabase plugins directory: - Standard installation (example): If your `metabase.jar` is at `~/app/metabase.jar`, place the driver in `~/app/plugins/` ```bash mkdir -p ~/app/plugins mv duckdb.metabase-driver.jar ~/app/plugins/ ``` - On Mac: The plugins directory is `~/Library/Application Support/Metabase/Plugins/` (if you are using a Mac) ```bash mkdir -p "${HOME}/Library/Application Support/Metabase/Plugins/" mv duckdb.metabase-driver.jar "${HOME}/Library/Application Support/Metabase/Plugins/" ``` - Custom location or Docker: set `MB_PLUGINS_DIR` to point Metabase at your plugins directory and place the `.jar` there (if you are using a custom location or Docker). 1. Restart Metabase so it picks up the new plugin. ### Remote (SSH) 1. SSH to the host and download to the plugins directory. Replace user/host and adjust `MB_PLUGINS_DIR` as needed. ```bash ssh user@your-host "bash -lc ' set -euo pipefail MB_PLUGINS_DIR=${MB_PLUGINS_DIR:-/app/plugins} mkdir -p "$MB_PLUGINS_DIR" if command -v wget >/dev/null; then wget -qO "$MB_PLUGINS_DIR/duckdb.metabase-driver.jar" \ https://github.com/MotherDuck-Open-Source/metabase_duckdb_driver/releases/latest/download/duckdb.metabase-driver.jar else curl -L -o "$MB_PLUGINS_DIR/duckdb.metabase-driver.jar" \ https://github.com/MotherDuck-Open-Source/metabase_duckdb_driver/releases/latest/download/duckdb.metabase-driver.jar fi '" ``` 2. Restart Metabase on the remote host: - systemd: `ssh user@your-host 'sudo systemctl restart metabase'` - Docker: `ssh user@your-host 'docker restart '` :::important Restart required: Metabase must be restarted after adding or upgrading plugins. Hot-reload of drivers is not supported. ::: :::tip Compatibility and upgrades: New DuckDB driver releases are designed to be backward compatible with recent Metabase versions. Upgrading to the latest driver is recommended for bug fixes and stability. If you run a significantly older Metabase version, validate in staging first. ::: ### Add your database connection After installing the driver, you can add MotherDuck as a data source in Metabase. 1. Log in to Metabase with admin credentials 2. Navigate to **Admin Settings** > **Databases** > **Add Database** 3. Select **DuckDB** as the database type :::note Since DuckDB does not do implicit casting by default, the `old_implicit_casting` config is necessary for datetime filtering in Metabase to function. It's recommended to keep it set. ::: #### Connecting to MotherDuck To connect to MotherDuck: 1. **Database name**: In the Database file field, enter `md:[database_name]` where `[database_name]` is your MotherDuck database name 2. **MotherDuck token**: Paste your MotherDuck token (retrieve from the [MotherDuck UI](/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck/authenticating-to-motherduck.md)) 3. **Configuration**: Enable `old_implicit_casting` (recommended) for proper datetime handling ![Metabase connection settings for MotherDuck](../img/metabase_motherduck.png) ### DuckLake on Metabase DuckLake is supported with the DuckDB driver in Metabase. Use the latest DuckDB driver release and a DuckDB version that supports DuckLake (DuckDB v1.3.2 or newer is recommended). #### MotherDuck-managed DuckLake If your DuckLake database is managed by MotherDuck, you can connect the same way you connect to any MotherDuck database: 1. Select DuckDB as the database type 2. Database file: `md:[ducklake_database_name]` 3. MotherDuck token: paste your token 4. Keep `old_implicit_casting` enabled (recommended) No extra Init SQL is required. Query your tables normally in Metabase. #### Own compute + DuckLake catalog (attach in init SQL) If you want Metabase’s embedded DuckDB to query a DuckLake stored externally, attach the DuckLake catalog in the connection’s Init SQL. This works for both MotherDuck-managed catalogs and self-managed catalogs. - Init SQL for a MotherDuck-managed DuckLake catalog: ```sql -- Attaches the DuckLake metadata catalog hosted in MotherDuck ATTACH 'ducklake:md:__ducklake_metadata_[database_name]' AS dl1; ``` - Init SQL for a self-managed DuckLake catalog (local metadata DB) with S3 data path: ```sql -- Replace the path to your DuckLake metadata DB and bucket prefix ATTACH 'ducklake:/duckdb/my_ducklake_metadata.ducklake' AS dl1 ( DATA_PATH 's3://my_bucket/lake/' ); ``` Once attached, reference tables with the alias, for example: `FROM dl1.my_table`. ### Connecting to a local DuckDB database To connect to a local DuckDB database: 1. Database file: enter the full path to your DuckDB file (e.g., `/path/to/database.db`) 2. Configuration: enable `old_implicit_casting` (recommended) to ensure proper datetime filtering :::note DuckDB's concurrency model supports either one process with read/write permissions, or multiple processes with read permissions, but not both at the same time. This means you will not be able to open a local DuckDB in read-only mode, then the same DuckDB in read-write mode in a different process. ::: ![Metabase connection settings for local DuckDB](../img/metabase_local_duckdb.png) ## Configuration best practices - **Connection pooling**: For production instances, set an appropriate connection pool size based on expected concurrent users - **Query timeouts**: Configure timeouts in Metabase settings to prevent long-running queries from affecting system performance - **Data access**: Use database-level permissions in Metabase to control who can access which data sources ## Troubleshooting | Issue | Solution | |-------|----------| | Driver not detected | Ensure driver is in the correct plugins directory and Metabase has been restarted | | Connection failures | Verify database path (local) or database name and token (MotherDuck) | | Permission errors | Check file permissions for local databases | | Datetime filtering issues | Enable `old_implicit_casting` in the connection settings | | Add MotherDuck token in the connection string | Specify a correct MotherDuck token or MotherDuck database name after the `md:` prefix | ### Updating the MotherDuck token Metabase keeps long-lived database connections alive. When you update only the MotherDuck token while an existing connection is still cached, Metabase raises `Connection error: Can't open a connection to same database file with a different configuration than existing connections`. Use one of the following approaches to refresh the token successfully: 1. **Add a cache buster while editing the database.** Edit the connection under **Admin Settings** > **Databases**, then update both the **Database file** field and the **MotherDuck Token** field with a small cache-busting change (for example, append `?refresh=20250917`). Updating both values at the same time forces Metabase to treat the configuration as new. Save the connection, then optionally revert the fields to their clean values once the change is persisted. 2. **Restart Metabase before updating the token.** Restart the Metabase service and, immediately after it starts, go straight to `/admin/databases` to update the token field. Do not open the Metabase home screen before editing the database connection, or the previous connection (with the old token) will be re-established. ### Connecting to a local DuckDB database To connect to a local DuckDB database: 1. **Database file**: Enter the full path to your DuckDB file (e.g., `/path/to/database.db`) 2. **Configuration**: Enable `old_implicit_casting` (recommended) to ensure proper datetime filtering 3. **Additional settings**: - **Read only**: Toggle as appropriate for your use case - **Naming strategy**: Choose your preferred table/field naming strategy :::note DuckDB's concurrency model supports either one process with read/write permissions, or multiple processes with read permissions, but not both at the same time. This means you will not be able to open a local DuckDB in read-only mode, then the same DuckDB in read-write mode in a different process. ::: ![Metabase connection settings for local DuckDB](../img/metabase_local_duckdb.png) --- Source: https://motherduck.com/docs/integrations/bi-tools/looker # Looker with MotherDuck > Connect Looker (Google Cloud core) to MotherDuck using the Postgres endpoint, including the required compatibility-mode parameter and recommended pooling and token settings. :::info[Preview] The Postgres endpoint is in [preview](/about-motherduck/feature-stages/). Features and behavior may change. ::: [Looker (Google Cloud core)](https://cloud.google.com/looker) connects to MotherDuck through the [Postgres endpoint](/key-tasks/authenticating-and-connecting-to-motherduck/postgres-endpoint/) using its standard PostgreSQL dialect. A Looker-specific compatibility mode is required so that symmetric aggregates and Persistent Derived Tables (PDTs) work correctly. ## Before you start You'll need: - A [Looker](https://cloud.google.com/looker) instance and admin access to create database connections - A [MotherDuck access token](/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck) (see [Choose the right token](#choose-the-right-token) below) - Your Postgres host, which you can find at [MotherDuck Postgres settings](https://app.motherduck.com/settings/postgres) (for example, `pg.us-east-1-aws.motherduck.com`) ## Connect to MotherDuck In Looker, go to **Admin → Connections → Add Connection** and configure: | Parameter | Value | |---|---| | **Dialect** | PostgreSQL 9.5+ | | **Host** | Your MotherDuck Postgres host (for example, `pg.us-east-1-aws.motherduck.com`) | | **Port** | `5432` | | **Database** | Your MotherDuck database name | | **Username** | `postgres` | | **Password** | Your [MotherDuck access token](/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck) (see [Choose the right token](#choose-the-right-token)) | | **SSL** | Enabled | | **Verify SSL** | Disabled, unless your Looker instance is configured for certificate verification | | **Additional JDBC Parameters** | `options=--compatibility-mode=looker` (see [Maintain user-duckling affinity](#maintain-user-duckling-affinity-with-session_name) to also pin users to read scaling ducklings) | ![Looker database and authentication settings for a MotherDuck Postgres endpoint connection](/img/integrations/looker-database-authentication-settings.png) In **Optional Settings**, enable **SSL** and **Database Connection Pooling**. Leave **Verify SSL** disabled unless your Looker instance is configured to verify the server certificate. ![Looker optional settings with SSL and database connection pooling enabled](/img/integrations/looker-optional-settings.png) After configuring the connection, click **Test these settings**. The test runs against MotherDuck and produces a known cancellation warning that is safe to ignore (see [Connection test behavior](#connection-test-behavior)). Click **Add Connection** to save. ## Required: compatibility mode parameter You **must** set the following in the **Additional JDBC Parameters** field: ```text options=--compatibility-mode=looker ``` This parameter does two important things: - Enables symmetric aggregates - Enables Persistent Derived Table (PDT) support Without it, symmetric aggregate queries return incorrect results and PDT builds fail. ## Enable connection pooling Enable **database connection pooling** in Looker's connection settings. DuckDB is optimized for large analytical queries rather than high volumes of short concurrent connections, so pooling reduces connection overhead and improves overall stability. This is the recommended configuration for MotherDuck. ## Maintain user-duckling affinity with session_name When you connect Looker with a [read scaling token](#choose-the-right-token), each new connection is assigned to one of the read scaling replicas ("ducklings") in your pool. By default Looker does not identify individual end users to MotherDuck, so a given user's queries can land on different ducklings and miss the warm cache. You can pin each Looker user to a consistent read scaling duckling by passing the [`session_name` parameter](/key-tasks/authenticating-and-connecting-to-motherduck/read-scaling/#session-affinity-with-session-name). MotherDuck routes all connections that share the same `session_name` value to the same replica, which improves cache reuse and gives that user a more consistent view of the data — while still letting the read scaling fleet scale out across many users. Looker can substitute a [user attribute](https://cloud.google.com/looker/docs/admin-panel-users-user-attributes) into the connection's **Additional JDBC Parameters** at connect time. Pass the user attribute as `session_name` under `options=`, alongside the required compatibility-mode flag: ```text options=--session_name={{ _user_attributes['email'] }} --compatibility-mode=looker ``` In this example, `email` is the user attribute used as the passthrough identifier, so each Looker user's queries are routed to a single read scaling duckling. Any configured Looker user attribute can be used instead of `email` — pick a value that is stable and unique per user (for example, a user ID or a hashed identifier for privacy). :::note Set up the passthrough user attribute in **Admin → Users → User Attributes** in Looker before referencing it in the connection. See the [Looker user attributes documentation](https://cloud.google.com/looker/docs/admin-panel-users-user-attributes) for details. This is most useful for customer-facing / embedded analytics, where each end user should reuse their own duckling's warm cache. ::: ## Choose the right token MotherDuck supports two token types. Choose based on how your Looker deployment will use the connection: | Token type | Use when | Notes | |---|---|---| | **Read scaling token** | Reporting / BI usage with many concurrent users (reads only) | Recommended for the main Looker connection when PDT writes are not needed on this connection. | | **Read/write token** | PDT builds, or any connection that needs to write tables | Looker supports configuring a separate PDT connection — you can use a read/write token there while keeping a read scaling token on the main connection. | ## Connection test behavior When you run Looker's built-in connection test, you may see a warning that query cancellation does not work. This is expected and can be safely ignored. The warning is produced because the test cancellation query itself fails due to memory consumption — not because the cancellation mechanism is broken. Production query cancellation is unaffected. ## Troubleshooting | Symptom | Resolution | |---|---| | Symmetric aggregate queries fail or return incorrect results | Ensure `options=--compatibility-mode=looker` is set in Additional JDBC Parameters. | | PDT build fails or Explore intermittently errors | Check **Admin → PDT → PDT Details** for build status and last SQL. Confirm the table exists in your MotherDuck scratch schema. | | Connection test shows cancellation warning | Expected behavior. The warning appears only during the test query and does not affect production query cancellation. | | Read scaling users aren't reusing a warm cache / land on different ducklings | Add `--session_name={{ _user_attributes[''] }}` under `options=` in Additional JDBC Parameters so each user is pinned to one duckling (see [Maintain user-duckling affinity](#maintain-user-duckling-affinity-with-session_name)). | ## Additional information - [Postgres endpoint reference](/sql-reference/postgres-endpoint) for connection parameters, SSL options, and limitations - [Connect through the Postgres endpoint](/key-tasks/authenticating-and-connecting-to-motherduck/postgres-endpoint/) for a general how-to guide - [Read scaling and session_name](/key-tasks/authenticating-and-connecting-to-motherduck/read-scaling/#session-affinity-with-session-name) - [Looker documentation: Connecting Looker to your database](https://cloud.google.com/looker/docs/db-config-postgresql) - [Looker documentation: User attributes](https://cloud.google.com/looker/docs/admin-panel-users-user-attributes) --- Source: https://motherduck.com/docs/integrations/bi-tools/excel # Connect MotherDuck to Excel > Use Excel's 'Get Data' flow with the DuckDB ODBC driver to load MotherDuck data into Excel. This setup works well for recurring reporting, analysis, ad hoc SQL exploration, finance models, and operational dashboards without relying on exported CSVs. ### Windows ## Before you start To get started you'll need the following. - Windows + Excel (ODBC is Windows-only for this flow) - A MotherDuck access token (create one in the [MotherDuck token page](/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck/#creating-an-access-token)) - Admin rights on your computer to install the ODBC driver ## Installation steps ### 1. Install the DuckDB ODBC driver 1. Download the latest MotherDuck-supported DuckDB ODBC driver that matches your Excel architecture: - AMD64: [duckdb_odbc-windows-amd64.zip](https://github.com/duckdb/duckdb-odbc/releases/download/v1.5.5.0/duckdb_odbc-windows-amd64.zip) - ARM64: [duckdb_odbc-windows-arm64.zip](https://github.com/duckdb/duckdb-odbc/releases/download/v1.5.5.0/duckdb_odbc-windows-arm64.zip) 2. Extract the `.zip` file and run `odbc_install.exe` as Administrator (right click -> Run as administrator). ### 2. Configure the DuckDB system DSN 1. Open the ODBC Data Source Administrator: - 64-bit Excel: Start menu -> ODBC Data Sources (64-bit) - 32-bit Excel: Start menu -> ODBC Data Sources (32-bit) ![ODBC Data Sources in Windows](./img/ODBC-data-sources-windows.png) 2. Go to System DSN, select DuckDB, and click Configure. ![Select the DuckDB system DSN](./img/ODBC-data-source-duckdb.png) 3. Set Database to one of the following: - Recommended (scoped): `md:your_database_name` - Open scope: `md:` (allows access to any database) 4. Click OK to save. ![DuckDB ODBC configuration for MotherDuck](./img/ODBC-data-source-configuration.png) Excel supplies the token on its own credentials screen, covered in the next step. Other ODBC tools may not offer that screen, in which case you can authenticate the DSN itself by embedding the token in the Database field. See [ODBC](/getting-started/interfaces/client-apis/other/odbc/#authenticating-with-an-access-token). ### 3. Connect from the data menu 1. In Excel, go to Data -> Get Data -> From Other Sources -> From ODBC. ![Excel Get Data menu](./img/getdata-excel.png) 2. Choose DuckDB from the DSN dropdown and click OK. ![From ODBC dialog in Excel](./img/from-ODBC-driver-excel.png) 3. On the credentials screen, choose Default or Custom and add this to the Connection string properties field: ```text motherduck_token= ``` ![DuckDB ODBC driver installer](./img/ODBC-driver-excel.png) 4. Click Connect. ### 4. Load or transform data Use the Navigator window to select tables and choose Load to bring data into Excel, or Transform Data to shape it in Power Query before loading. ### macOS ## Excel ODBC on macOS Direct ODBC connectivity between Excel and MotherDuck is **not supported on macOS** due to a driver incompatibility. ### Why it doesn't work Excel on macOS uses the **iODBC** driver manager, but the DuckDB ODBC driver is built for **unixODBC**. These drivers are incompatible at the binary level. This is a [known issue](https://github.com/duckdb/duckdb-odbc/issues/40) being tracked by the DuckDB team. If necessary, you can build this driver yourself. ### Alternatives for macOS users #### Option 1: Export directly with DuckDB (CLI and drivers) DuckDB has an [Excel extension](https://duckdb.org/docs/stable/core_extensions/excel) that can write `.xlsx` files directly. This works with DuckDB CLI or any DuckDB driver, but cannot be used in the MotherDuck UI because the UI cannot export `.xlsx` files to your local file system. ```sql -- Connect to MotherDuck and export to Excel ATTACH 'md:'; COPY (SELECT * FROM my_database.my_table) TO 'output.xlsx' WITH (FORMAT xlsx, HEADER true); ``` Or from the command line: ```bash duckdb -c "ATTACH 'md:'; COPY (SELECT * FROM my_database.my_table) TO 'output.xlsx' WITH (FORMAT xlsx, HEADER true);" ``` #### Option 2: Use the MotherDuck Web UI Query your data in the [MotherDuck Web UI](https://app.motherduck.com) and export results: 1. Run your query in the MotherDuck UI 2. Click the download button to export as CSV 3. Open the CSV in Excel #### Option 3: Export to CSV via DuckDB CLI Use the DuckDB CLI to export query results to CSV: ```bash duckdb -c "ATTACH 'md:'; COPY (SELECT * FROM my_database.my_table) TO 'output.csv' (HEADER, DELIMITER ',');" ``` ### Linux ## Excel workflows on Linux Direct ODBC connectivity between desktop Excel and MotherDuck is Windows-only for this flow. On Linux, use DuckDB CLI or a DuckDB client to export query results, then open the exported file in Excel, Excel for the web, or another spreadsheet tool. ### Option 1: Export directly with DuckDB (CLI and drivers) DuckDB has an [Excel extension](https://duckdb.org/docs/stable/core_extensions/excel) that can write `.xlsx` files directly. This works with DuckDB CLI or any DuckDB driver, but cannot be used in the MotherDuck UI because the UI cannot export `.xlsx` files to your local file system. ```sql -- Connect to MotherDuck and export to Excel ATTACH 'md:'; COPY (SELECT * FROM my_database.my_table) TO 'output.xlsx' WITH (FORMAT xlsx, HEADER true); ``` Or from the command line: ```bash duckdb -c "ATTACH 'md:'; COPY (SELECT * FROM my_database.my_table) TO 'output.xlsx' WITH (FORMAT xlsx, HEADER true);" ``` ### Option 2: Export to CSV via DuckDB CLI Use the DuckDB CLI to export query results to CSV: ```bash duckdb -c "ATTACH 'md:'; COPY (SELECT * FROM my_database.my_table) TO 'output.csv' (HEADER, DELIMITER ',');" ``` ## Tips - If you change your MotherDuck token, update the connection string properties in Excel. - If you use multiple databases, create separate DSNs (e.g., `DuckDB - analytics`, `DuckDB - finance`) with different `md:database` values. ## Troubleshooting ### How do I delete an existing MotherDuck connection? 1. In Excel, go to Data -> Queries & Connections. 2. Find the connection you want to remove, right click it, and choose Delete. ### How do I modify an existing MotherDuck connection? 1. In Excel, go to Data -> Queries & Connections. 2. Right click the connection and choose Properties. 3. Open the Definition tab and update the connection string (for example, update `motherduck_token=...`) and save. If you don't see the Definition tab, use Data -> Get Data -> Data Source Settings, select your DuckDB connection, then choose Change Source or Edit Permissions as needed. --- Source: https://motherduck.com/docs/integrations/bi-tools/index # Business Intelligence Tools > Use MotherDuck as a data source in tools for interactive data analysis and presentation MotherDuck integrates with popular business intelligence tools to help you analyze and visualize your data. ## Included pages - [Hex](https://motherduck.com/docs/integrations/bi-tools/hex): Connect Hex notebooks to MotherDuck using SQL data connections or Python cells for interactive analytics. - [Evidence](https://motherduck.com/docs/integrations/bi-tools/evidence): Evidence is an open source, code-based alternative to drag-and-drop BI tools. Build polished data products with just SQL and markdown. - [Superset & Preset](https://motherduck.com/docs/integrations/bi-tools/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. - [Metabase](https://motherduck.com/docs/integrations/bi-tools/metabase): Connect Metabase to MotherDuck through the Postgres endpoint on Metabase Cloud, or the DuckDB driver plugin on self-hosted instances. - [Tableau](https://motherduck.com/docs/integrations/bi-tools/tableau): Tableau is a widely-used business intelligence and data visualization platform that enables data analysts to build interactive dashboards and reports. You can connect Tableau Cloud to MotherDuck through the built-in PostgreSQL connector using MotherDuck's Postgres endpoint. For Tableau Desktop and Server, use the DuckDB JDBC connector. - [Looker with MotherDuck](https://motherduck.com/docs/integrations/bi-tools/looker): Connect Looker (Google Cloud core) to MotherDuck using the Postgres endpoint, including the required compatibility-mode parameter and recommended pooling and token settings. - [Connect MotherDuck to Excel](https://motherduck.com/docs/integrations/bi-tools/excel): Use Excel's 'Get Data' flow with the DuckDB ODBC driver to load MotherDuck data into Excel. This setup works well for recurring reporting, analysis, ad hoc SQL exploration, finance models, and operational dashboards without relying on exported CSVs. - [Microsoft Power BI](https://motherduck.com/docs/integrations/bi-tools/powerbi): Power BI is an interactive data visualization product developed by Microsoft. You can connect Power BI to MotherDuck through the built-in PostgreSQL database connector using MotherDuck's Postgres endpoint. - [Cube](https://motherduck.com/docs/integrations/bi-tools/cube): Cube is a semantic layer for building and visualizing data. It integrates with MotherDuck for dashboards, semantic models, and embedded analytics workflows. - [Explo](https://motherduck.com/docs/integrations/bi-tools/explo): Explo is a platform for embedded analytics, AI analytics, and data sharing in customer-facing products. It integrates with MotherDuck as a data source. - [Gooddata](https://motherduck.com/docs/integrations/bi-tools/gooddata): Enterprise analytics platform for building data products and embedded analytics. It integrates with MotherDuck for dashboards, semantic models, and embedded analytics workflows. - [Grafana](https://motherduck.com/docs/integrations/bi-tools/grafana): Grafana is an observability and dashboarding platform for building dashboards, alerts, and exploratory views. The MotherDuck-maintained DuckDB data source plugin lets Grafana query local DuckDB files and MotherDuck databases. - [Holistics](https://motherduck.com/docs/integrations/bi-tools/holistics): Holistics helps data teams set up self-service BIs that are reliable and easy to maintain. Everyone can now self-serve data with confidence by applying software's best practices. It integrates with MotherDuck for dashboards, semantic models, and embedded analytics workflows. - [Lightdash](https://motherduck.com/docs/integrations/bi-tools/lightdash): Lightdash is an open-source BI platform that turns your dbt project into a governed metrics and dashboarding layer. It connects to MotherDuck as a DuckDB warehouse. - [Omni](https://motherduck.com/docs/integrations/bi-tools/omni): Modern business intelligence platform for creating interactive dashboards and data visualizations. It integrates with MotherDuck for dashboards, semantic models, and embedded analytics workflows. - [Rill Data](https://motherduck.com/docs/integrations/bi-tools/rill-data): Rill Data is a data platform for building and visualizing data. It integrates with MotherDuck for dashboards, semantic models, and embedded analytics workflows. - [Zenlytic](https://motherduck.com/docs/integrations/bi-tools/zenlytic): Zenlytic is a data visualization platform for building and visualizing data. It integrates with MotherDuck for dashboards, semantic models, and embedded analytics workflows. --- Source: https://motherduck.com/docs/integrations/bi-tools/cube # Cube > Cube is a semantic layer for building and visualizing data. It integrates with MotherDuck for dashboards, semantic models, and embedded analytics workflows. ## How it works with MotherDuck Cube connects to MotherDuck through Cube's DuckDB data source. Use this setup when you want Cube's semantic layer, APIs, dashboards, or embedded analytics to query data that lives in MotherDuck. ## Prerequisites - A Cube project, either self-hosted or in Cube Cloud. - A MotherDuck service token or access token. For production deployments, use a dedicated service account token. - The MotherDuck database and schema Cube should use for its models. ## Setup ### Manual setup In a self-hosted Cube project, configure the DuckDB data source and pass the MotherDuck token to Cube: ```bash CUBEJS_DB_TYPE=duckdb CUBEJS_DB_DUCKDB_MOTHERDUCK_TOKEN= ``` Keep the token in your deployment secret manager rather than committing it to `.env`. ### Cube Cloud setup In Cube Cloud, choose **DuckDB** when creating the database connection, then paste your MotherDuck token into the **MotherDuck Token** field. ![Cube Cloud DuckDB connection form with a MotherDuck Token field](./img/cube-cloud-motherduck-connection.webp) Leave the MotherDuck token blank only when you are connecting Cube to a local DuckDB database instead of MotherDuck. ## Authentication and configuration - Use a read/write token if Cube needs to create or refresh objects in MotherDuck. Use a read token for read-only dashboard workloads. - Configure Cube's DuckDB schema setting if your Cube models should default to a specific MotherDuck schema. - If your Cube deployment reads private files from object storage through DuckDB, configure those storage credentials in Cube separately from the MotherDuck token. ## Important notes - Cube's DuckDB documentation includes S3, extension, and pre-aggregation settings. Those settings are Cube/DuckDB deployment details, not required for a basic MotherDuck connection. - For production, keep the MotherDuck token out of connection strings and application logs. - If you use Cube Cloud, allowlist the Cube Cloud IPs shown in the connection screen if your network policy requires it. ## Use cases - Build a governed semantic layer on top of MotherDuck tables. - Serve embedded analytics from Cube APIs while querying MotherDuck. - Prototype dashboard models locally and move the same Cube project to Cube Cloud. ## Related content - [Read the Cube blog on DuckDB and MotherDuck integrations](https://cube.dev/blog/introducing-duckdb-and-motherduck-integrations) - [View the full Cube DuckDB and MotherDuck setup guide](https://cube.dev/docs/product/configuration/data-sources/duckdb) - [MotherDuck authentication](/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck) --- Source: https://motherduck.com/docs/integrations/bi-tools/explo # Explo > Explo is a platform for embedded analytics, AI analytics, and data sharing in customer-facing products. It integrates with MotherDuck as a data source. ## How it works with MotherDuck Explo connects to MotherDuck as a data source for embedded analytics and customer-facing dashboards. ## Prerequisites - A MotherDuck database for Explo to query. - A MotherDuck access token provisioned for the Explo workspace. - The database name and any schema names you plan to expose in Explo. ## Setup 1. In MotherDuck, create an access token for Explo. 2. In Explo, create a new data source and select **MotherDuck**. 3. Enter the MotherDuck database name. 4. Choose the authentication option that uses an access token. 5. Paste the token and save the data source. ## Authentication and configuration - Use a dedicated token for each Explo environment or workspace. - Prefer read-only access for embedded analytics workloads. - Configure schema access in Explo so customer-facing dashboards only expose the intended data model. ## Important notes - Explo's MotherDuck documentation lists the required credentials but does not require a platform-specific environment variable list. - Keep the token in Explo's credential store and rotate it like any other production credential. ## Use cases - Power embedded dashboards from MotherDuck tables. - Build customer-facing analytics over per-customer or shared schemas. - Let Explo query curated datasets without moving data into another warehouse. ## Related content - [View the full Explo MotherDuck setup guide](https://docs.explo.co/data-sources/connecting-to-data-sources/data-source-types/motherduck#motherduck) - [MotherDuck authentication](/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck) --- Source: https://motherduck.com/docs/integrations/bi-tools/gooddata # Gooddata > Enterprise analytics platform for building data products and embedded analytics. It integrates with MotherDuck for dashboards, semantic models, and embedded analytics workflows. ## How it works with MotherDuck GoodData Cloud connects to MotherDuck as a data source for semantic models, dashboards, and embedded analytics. ## Prerequisites - A GoodData Cloud workspace with permission to create data sources. - A MotherDuck service token. - The MotherDuck database name and schema GoodData should use. ## Setup 1. In GoodData Cloud, open **Data sources** and select **Connect data**. 2. Select **MotherDuck**. 3. Enter a data source display name. 4. Paste the MotherDuck service token. 5. Enter the database name and schema. 6. Select **Connect**. ![GoodData MotherDuck data source form with service token, database, and schema fields](./img/gooddata-motherduck-data-source.webp) GoodData also supports creating the data source through its API. When using the API, encode the MotherDuck service token as required by the GoodData request body and use a JDBC URL such as `jdbc:duckdb:md:`. ## Authentication and configuration - Use a MotherDuck service token dedicated to the GoodData data source. - Enter a schema so GoodData can build its logical data model from the intended tables. - Keep the service token in GoodData's credential handling or your deployment secret store if you create the data source through the API. ## Important notes - GoodData's guide includes both UI and API setup. Start with the UI unless you need repeatable provisioning. - GoodData's API examples include GoodData API authentication details; those are separate from the MotherDuck service token. ## Use cases - Build governed BI workspaces on top of MotherDuck. - Create embedded analytics backed by MotherDuck tables. - Provision MotherDuck data sources with GoodData's API for repeatable environments. ## Related content - [View the full GoodData MotherDuck setup guide](https://www.gooddata.com/docs/cloud/connect-data/create-data-sources/motherduck/) - [MotherDuck authentication](/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck) --- Source: https://motherduck.com/docs/integrations/bi-tools/grafana # Grafana > Grafana is an observability and dashboarding platform for building dashboards, alerts, and exploratory views. The MotherDuck-maintained DuckDB data source plugin lets Grafana query local DuckDB files and MotherDuck databases. ## How it works with MotherDuck 1. Install Grafana 10.4.0 or later on a glibc-based Linux environment. If you use Docker, use an Ubuntu-based Grafana image instead of the default Alpine-based image. 2. Download the DuckDB data source plugin from the GitHub releases page. 3. Because the plugin is unsigned, allow `motherduck-duckdb-datasource` in Grafana's unsigned plugin configuration. 4. Add a DuckDB data source in Grafana and provide a MotherDuck token. 5. If `md:` does not work as the database path in a Docker deployment, leave the path blank and add `ATTACH IF NOT EXISTS 'md:';` in the initialization SQL. ## Related content - [View the full process in the Grafana DuckDB data source plugin documentation](https://github.com/motherduckdb/grafana-duckdb-datasource) - [Grafana data source documentation](https://grafana.com/docs/grafana/latest/features/datasources/) - [MotherDuck authentication](/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck) --- Source: https://motherduck.com/docs/integrations/bi-tools/holistics # Holistics > Holistics helps data teams set up self-service BIs that are reliable and easy to maintain. Everyone can now self-serve data with confidence by applying software's best practices. It integrates with MotherDuck for dashboards, semantic models, and embedded analytics workflows. ## How it works with MotherDuck Holistics connects to MotherDuck as a data source for semantic modeling, self-service BI, dashboards, and analytics-as-code workflows. ## Prerequisites - A Holistics workspace with permission to create data sources. - A MotherDuck access token. - The MotherDuck database and schemas Holistics should query. ## Setup 1. In MotherDuck, create an access token for Holistics. 2. In Holistics, open **Organization Settings** > **Data Sources**. 3. Select **New Data Source** and choose **MotherDuck**. 4. Enter a display name. 5. Paste the MotherDuck token. 6. Test and save the data source. ![Holistics MotherDuck data source form](./img/holistics-motherduck-data-source.png) ## Authentication and configuration - Use a dedicated MotherDuck token for Holistics. - Select the token type based on the work Holistics needs to run. Read-only access is enough for dashboard queries. - Share the Holistics data source only with the analysts or teams that should model and query the connected data. ## Important notes - Holistics queries MotherDuck directly; data remains in MotherDuck. - If you model data from multiple MotherDuck schemas, confirm the token can access all of them before saving the data source. ## Use cases - Model MotherDuck data in Holistics' semantic layer. - Build governed self-service dashboards. - Manage BI content through Holistics analytics-as-code workflows. ## Related content - [View the full Holistics MotherDuck setup guide](https://docs.holistics.io/docs/connect/databases/motherduck) - [MotherDuck authentication](/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck) --- Source: https://motherduck.com/docs/integrations/bi-tools/lightdash # Lightdash > Lightdash is an open-source BI platform that turns your dbt project into a governed metrics and dashboarding layer. It connects to MotherDuck as a DuckDB warehouse. ## How it works with MotherDuck Lightdash builds its semantic layer from your dbt project and queries the warehouse directly. When you connect a project, select **DuckDB** as the warehouse type and choose the MotherDuck option so Lightdash runs queries against your MotherDuck database. ## Prerequisites - A MotherDuck database with the tables or views your dbt project models. - A dbt project (dbt v1.8 or later) whose profile targets MotherDuck. - A MotherDuck access token for Lightdash to use. ## Setup 1. In MotherDuck, create an access token for Lightdash. 2. In Lightdash, create a project and select **DuckDB** as the warehouse type, then choose the **MotherDuck** option at the top of the connection form. 3. Fill in the connection fields: - **Database**: the MotherDuck database name. If your dbt profile uses `path: "md:analytics"`, enter `analytics`. - **Schema**: the schema Lightdash should use, for example `main`. - **Access token**: the MotherDuck token you created. - **Threads**: start with `1` and increase as needed. 4. Save the connection and let Lightdash compile your dbt project. ## Authentication and configuration - Use a dedicated token for Lightdash, scoped to only the database(s) you want it to query. - Enter the database name without the `md:` prefix. - Keep the schema in the connection form aligned with the schema your dbt models write to. Your dbt `profiles.yml` should target MotherDuck through the DuckDB adapter with the `motherduck` extension: ```yaml my-motherduck-db: target: prod outputs: prod: type: duckdb path: "md:analytics" schema: main threads: 4 extensions: - motherduck settings: motherduck_token: "{{ env_var('MOTHERDUCK_TOKEN') }}" ``` ## Important notes - Lightdash reads its metrics and dimensions from your dbt project, so keep the dbt models and Lightdash connection pointed at the same MotherDuck database and schema. - The "Start of week" setting controls which day begins the week in charts. "Auto" uses the warehouse default. ## Use cases - Expose a governed metrics layer over MotherDuck data built from your dbt models. - Build dashboards and explores for business users on top of curated MotherDuck schemas. - Reuse an existing dbt-on-MotherDuck project as the semantic layer for self-serve BI. ## Related content - [View the full Lightdash MotherDuck setup guide](https://docs.lightdash.com/get-started/setup-lightdash/connect-project#motherduck) - [dbt integration](/integrations/transformation/dbt/) - [MotherDuck authentication](/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck) --- Source: https://motherduck.com/docs/integrations/bi-tools/omni # Omni > Modern business intelligence platform for creating interactive dashboards and data visualizations. It integrates with MotherDuck for dashboards, semantic models, and embedded analytics workflows. ## How it works with MotherDuck Omni connects to MotherDuck as a database connection for modeling, dashboards, AI-assisted exploration, and embedded analytics. ## Prerequisites - Organization Admin permissions in Omni. - A MotherDuck database available on MotherDuck v0.10.2 or later. - A MotherDuck [read scaling token](/key-tasks/authenticating-and-connecting-to-motherduck/read-scaling/) for the Omni connection. This is the recommended default for querying and dashboards. - A Read/Write token only if you plan to use Omni's table uploads. ## Setup 1. In MotherDuck, create a read scaling token for Omni and copy it before closing the dialog. Omni's own setup documentation suggests a Read/Write token; that only applies if you need table uploads. 2. Optional: create a dedicated schema for Omni table uploads if users need to upload CSVs and join them to modeled data. 3. In Omni, open **Settings** > **Connections**. 4. Select **MotherDuck**. 5. Paste the MotherDuck token and complete the connection form. 6. Create the connection. ## Authentication and configuration - Use a dedicated token for the Omni connection. - Configure schema filters to limit what Omni imports into its model. - Use a separate upload schema if Omni users will upload files. Do not reuse that schema for modeled tables. - Review timezone settings during setup so dashboard results match your reporting conventions. :::note A read scaling token is the recommended default. Only use a Read/Write token if you need Omni's optional table uploads. :::: ## Use cases - Generate an Omni model from MotherDuck schemas. - Build BI dashboards and topics on top of MotherDuck. - Combine user-uploaded files with governed MotherDuck data in Omni. ## Related content - [Read the Omni announcement for MotherDuck support](https://omni.co/blog/announcing-support-for-motherduck) - [View the full Omni MotherDuck setup guide](https://docs.omni.co/connect-data/setup/motherduck#connecting-motherduck-to-omni) - [MotherDuck authentication](/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck) --- Source: https://motherduck.com/docs/integrations/bi-tools/rill-data # Rill Data > Rill Data is a data platform for building and visualizing data. It integrates with MotherDuck for dashboards, semantic models, and embedded analytics workflows. ## How it works with MotherDuck Rill can use MotherDuck as the OLAP engine that powers Rill dashboards. This is useful when your dashboard data already lives in MotherDuck and you do not want to ingest it into a separate Rill-managed engine. ## Prerequisites - Rill Developer or Rill Cloud. - A MotherDuck access token. - The MotherDuck database path and schema Rill should use. ## Setup 1. In MotherDuck, create an access token for Rill. 2. In Rill Developer, add MotherDuck as an OLAP connection through **Add Data**. 3. Rill creates a connector file such as `motherduck.yaml` and stores `MOTHERDUCK_TOKEN` in `.env`. 4. Configure the connector with an `md:` path and schema: ```yaml type: connector driver: duckdb token: "{{ .env.MOTHERDUCK_TOKEN }}" path: "md:my_database" schema_name: "my_schema" ``` 5. Set the project's `olap_connector` to the MotherDuck connector. ## Authentication and configuration - Keep `MOTHERDUCK_TOKEN` in `.env` or your Rill Cloud environment variables. - Use `rill env push` when deploying a project that already has the token in the local project environment. - Use the Rill connector YAML reference for optional connector parameters. ## Important notes - Creating a MotherDuck OLAP connection changes the project's default OLAP engine to MotherDuck. - Metrics view SQL should use DuckDB-compatible syntax because Rill sends dashboard queries to MotherDuck. ## Use cases - Build fast dashboards on existing MotherDuck tables. - Use MotherDuck as a bring-your-own OLAP engine for Rill. - Deploy the same Rill project locally and in Rill Cloud with environment-managed credentials. ## Related content - [View the full Rill MotherDuck setup guide](https://docs.rilldata.com/developers/build/connectors/olap/motherduck) - [MotherDuck authentication](/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck) --- Source: https://motherduck.com/docs/integrations/bi-tools/zenlytic # Zenlytic > Zenlytic is a data visualization platform for building and visualizing data. It integrates with MotherDuck for dashboards, semantic models, and embedded analytics workflows. ## How it works with MotherDuck Zenlytic connects to MotherDuck as a data source for governed metrics, dashboards, and AI-assisted analysis. ## Prerequisites - A Zenlytic workspace with permission to add data sources. - A MotherDuck service token with access to the databases Zenlytic should use. - The database name, if you want Zenlytic to connect to one database by default. ## Setup 1. In MotherDuck, create a service token for Zenlytic and copy it. 2. In Zenlytic, open **Settings** > **Data Sources**. 3. Select **Add Data Source** and choose **MotherDuck**. 4. Paste the service token. 5. Optionally enter a database name. 6. Test the connection, then save it. ## Authentication and configuration - Use a token with read access to the data Zenlytic should model. - If you omit the database name, configure the target database later in Zenlytic. - Rotate the token from MotherDuck if a Zenlytic workspace or project no longer needs access. ## Important notes - Zenlytic's setup guide calls out token permissions as the first troubleshooting check. If the connection fails, verify the token and database name first. - Keep the token scoped to analytics workloads rather than reusing a broad personal token. ## Use cases - Build a metrics layer over MotherDuck data. - Let teams ask governed analytics questions in Zenlytic. - Connect a specific MotherDuck database to a Zenlytic workspace. ## Related content - [View the full Zenlytic MotherDuck setup guide](https://docs.zenlytic.com/data-sources/motherduck_setup) - [MotherDuck authentication](/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck) --- Source: https://motherduck.com/docs/integrations/bi-tools/tableau/tableau-cloud # Tableau Cloud with MotherDuck > Connect Tableau Cloud to MotherDuck using the Postgres endpoint for dashboards and reports. :::info[Preview] The Postgres endpoint is in [preview](/about-motherduck/feature-stages/). Features and behavior may change. ::: :::warning[Looking for the Tableau Bridge setup?] Connecting through Tableau Bridge is a legacy approach. If you still need it, refer to the [legacy Tableau Bridge guide](./tableau-bridge.md). ::: ## Before you start You'll need: - A [Tableau Cloud](https://www.tableau.com/) account - A [MotherDuck access token](/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck) - Your Postgres host and port, which you can find at [MotherDuck Postgres settings](https://app.motherduck.com/settings/postgres) (for example, `pg.us-east-1-aws.motherduck.com`) ## Connect to MotherDuck 1. In a Tableau Cloud workbook, click **Connect to Data**. 2. Under the **Connectors** tab, select **PostgreSQL**. ![Tableau Cloud Connect to Data dialog showing the Connectors tab with PostgreSQL available](/img/integrations/tableau-pg-connectors.png) 3. Fill in the connection details: - **Server**: Your Postgres host (for example, `pg.us-east-1-aws.motherduck.com`). Find this at [MotherDuck Postgres settings](https://app.motherduck.com/settings/postgres). - **Port**: The port from your Postgres settings (for example, `5432`). - **Database**: Your database name in MotherDuck (for example, `sample_data`). - **Username**: `postgres` - **Password**: Your [MotherDuck access token](/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck) - Check **Require SSL**. ![Tableau Cloud PostgreSQL connection dialog with server, port, database, username, and password fields](/img/integrations/tableau-pg-connection.png) 4. Click **Sign In**. Tableau connects to MotherDuck and shows your tables. ![Tableau Cloud data source tab showing tables from the MotherDuck database](/img/integrations/tableau-pg-tables.png) 5. Select your tables and build visualizations with your MotherDuck data. ![Tableau Cloud worksheet with a line chart built from MotherDuck data](/img/integrations/tableau-pg-visualization.png) ## Connection parameters | Parameter | Value | |-----------|-------| | **Server** | `pg.-aws.motherduck.com` (find yours at [Postgres settings](https://app.motherduck.com/settings/postgres) or with [`md_user_info()`](/sql-reference/motherduck-sql-reference/md-user-info)) | | **Port** | `5432` (find yours at [Postgres settings](https://app.motherduck.com/settings/postgres)) | | **Database** | Your database name | | **Username** | `postgres` | | **Password** | Your [MotherDuck access token](/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck) | | **Require SSL** | Checked | ## Additional information - [Postgres endpoint reference](/sql-reference/postgres-endpoint) for connection parameters, SSL options, and limitations - [Connect through the Postgres endpoint](/key-tasks/authenticating-and-connecting-to-motherduck/postgres-endpoint) for a general how-to guide - [Tableau documentation](https://help.tableau.com/current/online/en-us/to_connect_live_sql.htm) --- Source: https://motherduck.com/docs/integrations/bi-tools/tableau/tableau-desktop # Tableau Desktop and Server with MotherDuck > Connect Tableau Desktop or Server to MotherDuck using the DuckDB JDBC driver and Tableau connector. ## Tableau Desktop setup for DuckDB and MotherDuck 1. Download a [recent version of the DuckDB JDBC driver](https://repo1.maven.org/maven2/org/duckdb/duckdb_jdbc/) and copy it into the Tableau Drivers directory: * MacOS: `~/Library/Tableau/Drivers/` * Windows: `C:\Program Files\Tableau\Drivers` * Linux: `/opt/tableau/tableau_driver/jdbc` 2. Download the signed tableau connector (aka "Taco file") file from the [latest available release](https://github.com/MotherDuck-Open-Source/duckdb-tableau-connector/releases) and copy it into the Connectors directory: * Desktop Windows: `C:\Users\[YourUser]\Documents\My Tableau Repository\Connectors` * Desktop MacOS: `/Users/[YourUser]/Documents/My Tableau Repository/Connectors` * Server Windows: `C:\ProgramData\Tableau\Tableau Server\data\tabsvc\vizqlserver\Connectors` * Server Linux: `[Your Tableau Server Install Directory]/data/tabsvc/vizqlserver/Connectors` ## Connecting Once the Taco is installed, and you have launched Tableau, you can create a new connection by choosing "DuckDB by MotherDuck": ![Tableau connector list](../../img/tableau-connector-list.png) ### Local DuckDB database If you wish to connect to a local DuckDB database, select "Local file" as DuckDB Server option, and use the file picker: ![DuckDB Server dropdown](../../img/tableau-connect-options-local-file.png) ![Connection Dialogue](../../img/tableau-connect-local-file.png) ### In-memory database The driver can be used with an in-memory database by selecting the `In-memory database` DuckDB Server option. ![DuckDB Server dropdown](../../img/tableau-connect-options-in-memory.png) The data will then need to be provided by an Initial SQL string, for example: ```sql CREATE VIEW my_parquet AS SELECT * FROM read_parquet('/path/to/file/my_file.parquet'); ``` You can then access it by using the Tableau Data Source editing controls. ### MotherDuck To connect to MotherDuck, you have two authentication options: * Token -- provide the value that you [get from MotherDuck UI](/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck/#creating-an-access-token). * No Authentication -- unless `motherduck_token` environment variable is available to Tableau at startup, you will then be prompted to authenticate when at connection time. To work with a MotherDuck database in Tableau, you have to provide the database to use when issuing queries. In `MotherDuck Database` field, provide the name of your database. You don't have to prefix it with `md:`: ![DuckDB Server dropdown](../../img/tableau-connect-options-md.png) ![Connection Dialogue](../../img/tableau-connect-motherduck.png) ## Additional information * [Tableau Documentation](https://help.tableau.com/current/pro/desktop/en-us/gettingstarted_overview.htm) * [Tableau Exchange Connector DuckDB/MotherDuck](https://exchange.tableau.com/en-gb/products/1021) * [DuckDB Tableau Connector](https://github.com/MotherDuck-Open-Source/duckdb-tableau-connector/) --- Source: https://motherduck.com/docs/integrations/bi-tools/tableau/tableau-bridge # Tableau Bridge (legacy) > Connect Tableau Cloud to MotherDuck using Tableau Bridge and the DuckDB JDBC connector. :::warning[Deprecated] Connecting through Tableau Bridge is a legacy approach. Use the [Postgres endpoint setup](./tableau-cloud.mdx) instead for a simpler connection that doesn't require Bridge infrastructure. ::: ## How to use Tableau Cloud with MotherDuck through Tableau Bridge ### Setup This guide assumes you have: - a [Tableau account](https://www.tableau.com/) - a Tableau Cloud Site - a Tableau Desktop installation (with the same version as the Tableau Cloud Server Version) set up with the DuckDB JDBC Driver and Tableau Connector. If you don't, sign up or ask your organization to purchase a plan, or sign up for a free trial. ### Obtain a PAT token Follow [Tableau's instructions on creating a PAT token.](https://help.tableau.com/current/server/en-us/security_personal_access_tokens.htm) This token must belong to a site admin. ### Set up Bridge client Use the [Tableau Bridge client setup instructions](https://help.tableau.com/current/online/en-us/to_bridge_client.htm) to install and set up Bridge client. 1. Make sure the machine where the Bridge client is installed has access to the Database used in the above steps. Important notes: > Network access - Because Bridge facilitates connections between your private network data and Tableau Cloud, it requires the ability to make outbound connections through the internet. After the initial outbound connection, communication is bidirectional. > Required ports - Tableau Bridge uses port 443 to make outbound internet requests to Tableau Cloud and port 80 for certificate validation. 2. Install Bridge client and make sure the Bridge client is signed in to the Tableau Cloud site. You can download the installer from the [Tableau Bridge releases page](https://www.tableau.com/support/releases/bridge). 3. Install the driver and taco files as outlined in the [Tableau connector setup guide](https://help.tableau.com/current/online/en-us/to_sync_local_data.htm#connectors-and-data-types). - [Windows Server] The driver also needs to be installed here: `C:\Program Files\Tableau\Tableau Bridge\Drivers` - [Windows Server] The connector also needs to be installed here: `C:\Program Files\Tableau\Connectors` > Note: Tableau Bridge can be deployed on both Windows or Linux. ### Running Bridge on Linux using Docker (advanced) If you want to run Bridge centrally on a Linux host, the official guidance recommends running it inside a Docker container, as described in Tableau's documentation on [installing Bridge for Linux in containers](https://help.tableau.com/current/online/en-us/to_bridge_linux_install.htm). Below is an **example Dockerfile** you can use as a starting point—this includes where to add JDBC drivers and the **DuckDB/MotherDuck** `.taco` file. It's provided for inspiration and may require updates to match your environment or newer versions of the software.
Example Dockerfile ```dockerfile FROM registry.access.redhat.com/ubi8/ubi:latest RUN yum update -y RUN yum install -y glibc-langpack-en # This is the latest version of Tableau Bridge that is known working with the MotherDuck connector RUN curl -o /tmp/TableauBridge.rpm -L \ https://downloads.tableau.com/tssoftware/TableauBridge-20243.25.0114.1153.x86_64.rpm && \ ACCEPT_EULA=y yum install -y /tmp/TableauBridge.rpm && \ rm /tmp/TableauBridge.rpm # Drivers RUN mkdir -p /opt/tableau/tableau_driver/jdbc # Connectors (tacos) RUN mkdir -p /root/Documents/My_Tableau_Bridge_Repository/Connectors # Download DuckDB JDBC driver and signed taco RUN curl -o /opt/tableau/tableau_driver/jdbc/duckdb_jdbc-1.3.0.0.jar \ -L https://repo1.maven.org/maven2/org/duckdb/duckdb_jdbc/1.3.0.0/duckdb_jdbc-1.3.0.0.jar && \ curl -o /root/Documents/My_Tableau_Bridge_Repository/Connectors/duckdb_jdbc-v1.1.1-signed.taco \ -L https://github.com/motherduckdb/duckdb-tableau-connector/releases/download/v1.1.1/duckdb_jdbc-v1.1.1-signed.taco ENV TZ=Europe/Berlin ENV LC_ALL=en_US.UTF-8 # ----- user specific settings ----- ENV USER_EMAIL="" ENV PAT_ID=BridgeToken ENV CLIENT_NAME="" ENV SITE_NAME="" ENV POOL_ID="" # ----------------------------------- CMD /opt/tableau/tableau_bridge/bin/run-bridge.sh -e \ --patTokenId=$PAT_ID \ --userEmail=$USER_EMAIL \ --client=$CLIENT_NAME \ --site=$SITE_NAME \ --patTokenFile="/home/documents/token.txt" \ --poolId=$POOL_ID ```
Key points: * Build an image that **installs the Bridge RPM** and then copies the DuckDB JDBC driver to `/opt/tableau/tableau_bridge/Drivers` and the connector to `/root/Documents/My_Tableau_Bridge_Repository/Connectors`. * Start the bridge by calling `run-bridge.sh` and pass the following flags: * `--patTokenFile /run/secrets/pat.json` * `--patTokenId ` * `--site ` * `--poolId ` (optional – see note on pools below) * **PAT naming rule** – the *name* you give the Personal-Access-Token in Tableau **must** be a valid JSON key and must be used **verbatim** 1. as the key in `pat.json` → `{"": ""}` 2. in the `--patTokenId` flag. A mismatch will result in a silent authentication failure. * The latest Bridge **2025.1** builds contain a regression that prevents the MotherDuck connector (and several others) from loading. Until Tableau fixes this, pin the image to the **20243.25.0114.1153** release (see discussion in [GitHub issue #22](https://github.com/MotherDuck-Open-Source/duckdb-tableau-connector/issues/22)). * Bridge listens only on outbound **443/tcp**, so you do **not** need to publish any container ports. If you run a host firewall (for example, `ufw`) remember that Docker bypasses it [[Docker docs](https://docs.docker.com/engine/network/packet-filtering-firewalls/#docker-and-ufw)]. Restrict egress traffic to Tableau Cloud CIDR blocks if your security policy requires it. * Logs written to `stdout` are useful, but the *detailed* logs live in `/root/Documents/My_Tableau_Bridge_Repository/Log`. Mount this path as a volume or use a side-car to ship the logs to your observability stack. ### Tableau Cloud Bridge pool setup By default, Tableau places the Bridge in the default pool. 1. In Settings → Bridge page, make sure the Bridge client is connected in the connection Status. 2. In the "Private Network Allowlist" add the domain of the database and select the pool. ![Tableau Bridge Pooling](useBaseUrl('/img/integrations/tableau-bridge-pooling.png')) > **Pool Gotcha**: Some users report that a Linux containerised Bridge never shows up under a custom site pool. If that happens, leave `POOL_ID` blank when starting the client – it will join the legacy **Default** pool and still work with live connections. ### Create embedded data source (live) and workbook 1. Open Tableau desktop and sign in to a Tableau Cloud site. > Note: Make sure the Tableau Desktop and [Tableau Cloud version](https://help.tableau.com/current/server/en-us/version_server_view.htm) match. 2. Create new Workbook and select the database connector. 3. Connect to the database. ![Tableau Cloud DuckDB connector dialog](useBaseUrl('/img/integrations/tableau-cloud-connect-motherduck.png')) 4. Set up Datasource to use live connectivity. 5. Create a worksheet with the data. ![Tableau worksheet with MotherDuck data](useBaseUrl('/img/integrations/tableau-create-worksheet.png')) ### Publish the workbook to Tableau Cloud 1. Click on "Server > Publish Workbook". ![Tableau publish workbook menu](useBaseUrl('/img/integrations/tableau-publish-workbook.png')) 2. Select "Publish Separately" under Publish Type and "Embedded password" under Authentication. Select "Maintain connection to a live data source". ![Tableau publish separately dialog](useBaseUrl('/img/integrations/tableau-publish-separately.png')) ![Tableau publish workbook and data source dialog](useBaseUrl('/img/integrations/tableau-publish-workbook-and-data-source.png')) 3. Click "Publish Workbook & 1 Data Source". ![Tableau publishing complete confirmation](useBaseUrl('/img/integrations/tableau-publishing-complete.png')) ### (Important step!) update Tableau Bridge client in data source 1. Navigate to the newly published data source in Tableau Cloud (in your browser) and click on the "i" icon to open Data Source Details. ![Tableau data source info icon](useBaseUrl('/img/integrations/tableau-data-source-i.png')) 2. Click on "Change Bridge Client..." ![Tableau data source details dialog](useBaseUrl('/img/integrations/tableau-data-source-details.png')) 3. Change the bridge client from "Site client pool" to your bridge client (the one you set up in the previous section). Click "Save" and close the dialog. ![Tableau change bridge client dialog](useBaseUrl('/img/integrations/tableau-change-bridge-client.png')) 4. Check that the data source shows up in your Tableau Bridge status dialog. This dialog is located in the Windows Start bar (in the Icon panel). ![Tableau Bridge connected status](useBaseUrl('/img/integrations/tableau-bridge-connected.png')) 5. You can access your Published Workbook on your Tableau Cloud Site, or you can create a new Tableau Workbook using the Published Data Source. ![Tableau workbook using published data source](useBaseUrl('/img/integrations/tableau-workbook-using-this-data-source.png')) ## Additional information - [Tableau Documentation](https://help.tableau.com/current/pro/desktop/en-us/gettingstarted_overview.htm) - [Tableau Exchange Connector DuckDB/MotherDuck](https://exchange.tableau.com/en-gb/products/1021) - [DuckDB Tableau Connector](https://github.com/MotherDuck-Open-Source/duckdb-tableau-connector/) --- Source: https://motherduck.com/docs/integrations/bi-tools/tableau/index # Tableau > Tableau is a widely-used business intelligence and data visualization platform that enables data analysts to build interactive dashboards and reports. You can connect Tableau Cloud to MotherDuck through the built-in PostgreSQL connector using MotherDuck's Postgres endpoint. For Tableau Desktop and Server, use the DuckDB JDBC connector. ## Included pages - [Tableau Cloud with MotherDuck](https://motherduck.com/docs/integrations/bi-tools/tableau/tableau-cloud): Connect Tableau Cloud to MotherDuck using the Postgres endpoint for dashboards and reports. - [Tableau Desktop and Server with MotherDuck](https://motherduck.com/docs/integrations/bi-tools/tableau/tableau-desktop): Connect Tableau Desktop or Server to MotherDuck using the DuckDB JDBC driver and Tableau connector. - [Tableau Bridge (legacy)](https://motherduck.com/docs/integrations/bi-tools/tableau/tableau-bridge): Connect Tableau Cloud to MotherDuck using Tableau Bridge and the DuckDB JDBC connector. --- Source: https://motherduck.com/docs/integrations/bi-tools/powerbi/powerbi-desktop # Power BI Desktop with MotherDuck > Connect Power BI Desktop to MotherDuck using the Postgres endpoint for dashboards and reports. :::info[Preview] The Postgres endpoint is in [preview](/about-motherduck/feature-stages/). Features and behavior may change. ::: :::warning[Looking for the custom connector?] The DuckDB custom connector is a legacy approach. If you still need it, see the [legacy custom connector guide](./powerbi-custom-connector.md). ::: ## Before you start You'll need: - [Power BI Desktop](https://www.microsoft.com/en-us/power-platform/products/power-bi/desktop) installed on Windows - A [MotherDuck access token](/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck) - Your Postgres host, which you can find at [MotherDuck Postgres settings](https://app.motherduck.com/settings/postgres) (for example, `pg.us-east-1-aws.motherduck.com`) ## Connect to MotherDuck 1. In Power BI Desktop, click **Get data**. ![Power BI Get Data dialog showing PostgreSQL database connector](/img/integrations/powerbi-pg-get-data.png) 2. Search for **PostgreSQL database** in the connector list and select it. 3. Fill in the connection details: - **Server**: Your Postgres host (for example, `pg.us-east-1-aws.motherduck.com`). You can find this at [MotherDuck Postgres settings](https://app.motherduck.com/settings/postgres). - **Database**: Your database or share name in MotherDuck (for example, `sample_data`). 4. Select a data connectivity mode: - **DirectQuery**: Queries run against MotherDuck in real time. Best for dashboards that need up-to-date data. - **Import**: Loads a snapshot of the data into Power BI's in-memory model. Best when you want fast local interactions and can refresh on a schedule. ![Power BI PostgreSQL connection dialog with server and database fields](/img/integrations/powerbi-pg-connection.png) 5. Click **OK**. 6. When prompted for credentials, select **Database** on the left and enter: - **User name**: `postgres` - **Password**: Your [MotherDuck access token](/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck) ![Power BI credentials dialog with user name and password fields](/img/integrations/powerbi-pg-credentials.png) 7. Click **Connect**. In the Navigator, select the tables you want to use and click **Load**. ![Power BI Navigator showing tables from MotherDuck](/img/integrations/powerbi-pg-navigator.png) 8. You can build visualizations with your MotherDuck data. ![Power BI dashboard with visualizations from MotherDuck data](/img/integrations/powerbi-pg-query-result.png) ## Connection parameters | Parameter | Value | |-----------|-------| | **Server** | `pg.-aws.motherduck.com` (find yours at [Postgres settings](https://app.motherduck.com/settings/postgres) or with [`md_user_info()`](/sql-reference/motherduck-sql-reference/md-user-info)) | | **Database** | Your database name or share name | | **User name** | `postgres` | | **Password** | Your [MotherDuck access token](/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck) | ## Additional information - [Postgres endpoint reference](/sql-reference/postgres-endpoint) for connection parameters, SSL options, and limitations - [Connect through the Postgres endpoint](/key-tasks/authenticating-and-connecting-to-motherduck/postgres-endpoint) for a general how-to guide - [Power BI documentation](https://learn.microsoft.com/en-us/power-bi/connect-data/) --- Source: https://motherduck.com/docs/integrations/bi-tools/powerbi/powerbi-service # Power BI Service with MotherDuck > Publish Power BI reports to the cloud using the On-Premises Data Gateway and MotherDuck's Postgres endpoint. :::info[Preview] The Postgres endpoint is in [preview](/about-motherduck/feature-stages/). Features and behavior may change. ::: Power BI Service is the cloud-based version of Power BI that lets you publish, share, and schedule refreshes for reports and dashboards. To connect Power BI Service to MotherDuck, you need a Microsoft On-Premises Data Gateway that bridges the cloud service to MotherDuck's Postgres endpoint. Both **Import** and **DirectQuery** modes work through the gateway. ## Before you start You'll need: - A published `.pbix` report connected to MotherDuck through the [Power BI Desktop setup](./powerbi-desktop.mdx) - A [Power BI Pro or Premium Per User](https://www.microsoft.com/en-us/power-platform/products/power-bi/pricing) license (required for sharing reports and using the standard gateway) - A [MotherDuck access token](/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck) - A Windows machine to host the gateway (see [Microsoft's gateway requirements](https://learn.microsoft.com/en-us/data-integration/gateway/service-gateway-install#requirements)) ## Install the gateway 1. Download the standard gateway installer from [Microsoft's gateway download page](https://aka.ms/on-premises-data-gateway-installer). Download the **standard (enterprise) gateway**, not the personal mode gateway. 2. Run the installer and accept the default installation path. 3. After installation, the configuration wizard opens. Sign in with your **Microsoft work or school account** (the one associated with your Power BI tenant). 4. Select **Register a new gateway on this computer**. 5. Enter a gateway name (for example, `MD-PG-Gateway`) and a recovery key. Store the recovery key securely. 6. Click **Configure** and wait for registration to complete. **Verify:** The configuration wizard shows "The gateway is online and ready to be used." The Windows service `On-premises data gateway service` should be running in `services.msc`. ![On-premises data gateway configuration wizard showing the gateway is online and ready](/img/integrations/powerbi-service-gateway-ready.png) ## Add a MotherDuck data source 1. In [Power BI Service](https://app.powerbi.com), click the **Settings gear** and select **Manage connections and gateways**. 2. Verify your gateway shows **Online**. 3. Click **+ New** and select **On-premises**. 4. Fill in the connection details: | Field | Value | |-------|-------| | **Gateway cluster name** | Select your gateway | | **Connection name** | A descriptive name (for example, `MotherDuck-PG-sample_data`) | | **Data Source Type** | **PostgreSQL** | | **Server** | Your Postgres host (for example, `pg.us-east-1-aws.motherduck.com`) | | **Database** | Your MotherDuck database name | | **Authentication method** | **Basic** | | **Username** | `postgres` | | **Password** | Your [MotherDuck access token](/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck) | | **Encrypted Connection** | Checked | | **Privacy Level** | Organizational | ![Power BI Service new connection dialog with gateway, server, and database fields](/img/integrations/powerbi-service-new-connection.png) ![Power BI Service connection dialog showing authentication, encryption, and privacy settings](/img/integrations/powerbi-service-connection-auth.png) 5. Click **Create**. :::warning The **Server** and **Database** values must match your `.pbix` file character-for-character. If they differ, the published dataset won't find the gateway data source. ::: ## Publish and connect a report 1. In Power BI Desktop, publish your report: **File > Publish > Publish to Power BI** and select a workspace. 2. In Power BI Service, go to the workspace and find the semantic model (dataset). 3. Open **Settings** for the semantic model and expand **Gateway and cloud connections**. 4. Map the connection to your gateway data source. ![Power BI Service gateway and cloud connections settings showing the gateway mapped to a MotherDuck data source](/img/integrations/powerbi-service-gateway-mapping.png) 5. Under **Data source credentials**, click **Edit credentials** and enter: - Authentication method: **Basic** - User name: `postgres` - Password: Your MotherDuck access token - Encrypted connection: Checked 6. Click **Sign in**. ## Set up scheduled refresh For reports using **Import** mode, you can configure automatic data refreshes. 1. In the semantic model settings, expand **Refresh**. 2. Toggle **Keep your data up to date** to **On**. 3. Set your refresh frequency and time zone. 4. Click **Apply**. To verify, trigger a manual refresh: open the semantic model's three-dot menu and select **Refresh now**. All steps should complete with green check marks. ![Power BI Service refreshing data dialog showing all steps completed successfully](/img/integrations/powerbi-service-refresh-complete.png) ## DirectQuery through the gateway For reports using **DirectQuery** mode, queries run against MotherDuck in real time through the gateway. No scheduled refresh is needed since data is always live. After publishing and mapping the gateway data source (steps above), DirectQuery reports work automatically in Power BI Service. ![Power BI Service showing a report with visualizations from MotherDuck data](/img/integrations/powerbi-service-report.png) ## Connection parameters | Parameter | Value | |-----------|-------| | **Server** | `pg.-aws.motherduck.com` (find yours at [Postgres settings](https://app.motherduck.com/settings/postgres) or with [`md_user_info()`](/sql-reference/motherduck-sql-reference/md-user-info)) | | **Database** | Your database name | | **Username** | `postgres` | | **Password** | Your [MotherDuck access token](/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck) | | **Encrypted Connection** | Checked | ## Troubleshooting ### Gateway shows offline Check the gateway machine is on, connected to the network, and the `On-premises data gateway service` Windows service is running. Restart the service if needed. ### Firewall blocking port 5432 If `Test-NetConnection -ComputerName pg.us-east-1-aws.motherduck.com -Port 5432` returns `TcpTestSucceeded: False`, add an outbound firewall rule allowing TCP 5432 to the MotherDuck Postgres host. ### SSL/TLS handshake failure MotherDuck uses certificates from a publicly trusted CA, so the gateway should trust them by default. If you see "The remote certificate is invalid," run Windows Update to refresh the root CA store, or manually import the ISRG Root X1 certificate into the machine-level Trusted Root Certification Authorities store. After importing, restart the gateway service. ### Credential errors - The username must be `postgres`. - The password is your **MotherDuck access token** (starting with `md_`), not your web UI password. - Check for trailing whitespace in the token. ### Published dataset doesn't see the gateway The **Server** and **Database** values in the gateway data source must match the `.pbix` file exactly, including case. Recreate the data source with the correct values if they differ. ## Additional information - [Postgres endpoint reference](/sql-reference/postgres-endpoint) for connection parameters, SSL options, and limitations - [Connect through the Postgres endpoint](/key-tasks/authenticating-and-connecting-to-motherduck/postgres-endpoint) for a general how-to guide - [Microsoft gateway documentation](https://learn.microsoft.com/en-us/power-bi/connect-data/service-gateway-onprem) - [Power BI Service documentation](https://learn.microsoft.com/en-us/power-bi/fundamentals/power-bi-service-overview) --- Source: https://motherduck.com/docs/integrations/bi-tools/powerbi/powerbi-custom-connector # Power BI custom connector (legacy) > Connect Power BI to MotherDuck using the DuckDB ODBC driver and Power Query custom connector. :::warning[Legacy] The custom connector is a legacy approach. Use the [Postgres endpoint setup](./powerbi-desktop.mdx) instead for a simpler connection that doesn't require installing drivers or custom extensions. ::: The open-source [DuckDB Power Query Connector](https://github.com/motherduckdb/duckdb-power-query-connector/) lets you connect Power BI to DuckDB and MotherDuck using the DuckDB ODBC driver. ## Installing 1. Download the latest MotherDuck-supported DuckDB ODBC driver that matches your Power BI architecture: - [Windows AMD64](https://github.com/duckdb/duckdb-odbc/releases/download/v1.5.5.0/duckdb_odbc-windows-amd64.zip) - [Windows ARM64](https://github.com/duckdb/duckdb-odbc/releases/download/v1.5.5.0/duckdb_odbc-windows-arm64.zip) See [the releases page](https://github.com/duckdb/duckdb-odbc/releases) for other versions and architectures. For more information about the Windows ODBC Driver, see the [DuckDB Docs page on DuckDB ODBC API on Windows](https://duckdb.org/docs/stable/clients/odbc/windows). 2. Extract the `.zip` archive. Run `odbc_install.exe`. If Windows displays a security warning, click "More information" then "Run Anyway". 3. Optionally, verify the installation in the Registry Editor: - Open Registry Editor by running `regedit` - Navigate to `HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\DuckDB` - Confirm the Driver field shows your installed version - If incorrect, delete the `DuckDB` registry key and reinstall 4. Configure Power BI security settings to allow loading of custom extensions: - Go to File -> Options and settings -> Options -> Security -> Data Extensions - Enable "Allow any extensions to load without validation or warning" - ![Dialog window showing Power BI Options to Security to Data Extensions](/img/integrations/PowerBI-data-extensions.png) 5. Download the latest version of the DuckDB Power Query extension: - [duckdb-power-query-connector.mez](https://github.com/MotherDuck-Open-Source/duckdb-power-query-connector/releases/latest/download/duckdb-power-query-connector.mez) 6. Create the Custom Connectors directory if it does not yet exist: - Navigate to `[Documents]\Power BI Desktop\Custom Connectors` - Create this folder, if it doesn't exist - Note: If this location does not work you may need to place this in your OneDrive Documents folder instead 7. Copy the `duckdb-power-query-connector.mez` file into the Custom Connectors folder 8. Restart Power BI Desktop ## How to use with Power BI 1. In Power BI Desktop, click "Get Data" -> "More..." ![Power BI Get Data dialog](/img/integrations/PowerBI-get-data.png) 2. Search for "DuckDB" in the connector search box and select the DuckDB connector ![Power BI connector search showing the DuckDB connector](/img/integrations/PowerBI-Select-source-duckdb.png) 3. For MotherDuck connections, you'll need to provide: - Database Location: Use the `md:` prefix followed by your database name (for example, `md:my_database`). This can also be a local file path (for example, `~\my_database.db`) or an in-memory database (`:memory:`). - MotherDuck Token: Get your token from [MotherDuck's token page](/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck/#creating-an-access-token). *For local DuckDB connections:* Enter "localtoken" to enable the connection. ![Power BI DuckDB connection dialog](/img/integrations/PowerBI-duckdb-database.png) - Read Only (Optional): Set to `true` if you only need read access. - Saas_mode (Optional): Set to `true` to disable [DuckDB extensions](../../../concepts/duckdb-extensions.md). - Attach_mode (Optional): Set to `single` to scope the connection to one database (recommended for BI-tool catalog browsers, which can be confused by multiple attached databases). Leave blank to use the default workspace mode and see all databases in your workspace. See [Attach modes](/key-tasks/authenticating-and-connecting-to-motherduck/attach-modes/). 4. Click "OK". 5. Click "Connect". ![Power BI connection dialog for MotherDuck through the DuckDB connector](/img/integrations/PowerBI-DuckDB-connect.png) 6. Select the table(s) you want to import. Click "Load". ![Power BI Navigator dialog previewing and selecting tables](/img/integrations/PowerBI-data-selection.png) 7. You can query your data and create visualizations. ![Power BI report built from MotherDuck data](/img/integrations/PowerBI-example-graph.png) 8. After connecting, you can: - Browse and select tables from your MotherDuck or DuckDB database - Use "Transform Data" to modify your queries before loading - Write custom SQL queries using the "Advanced Editor" - Import multiple tables in one go 9. Power BI maintains the connection to your MotherDuck or DuckDB database, letting you: - Refresh data automatically or on-demand - Create relationships between tables - Build visualizations and dashboards - Share reports with other users (requires proper gateway setup) ## Use custom data connectors with an on-premises data gateway You can use custom data connectors with an on-premises data gateway to connect to data sources that are not supported by default. To do this, you need to install the on-premises data gateway and configure it to use the custom data connector. For more information, see [Use custom data connectors with an on-premises data gateway in Power BI](https://learn.microsoft.com/en-us/power-bi/connect-data/service-gateway-custom-connectors). There are some limitations with using a custom connector with an on-premises data gateway: - The folder you create must be accessible to the background gateway service. Folders under user Windows folders or system folders typically aren't accessible. The on-premises data gateway app shows a message if the folder isn't accessible. This limitation doesn't apply to the on-premises data gateway (personal mode). - If your custom connector is on a network drive, include the fully qualified path in the on-premises data gateway app. - You can only use one custom connector data source when working in DirectQuery mode. Multiple custom connector data sources don't work with DirectQuery. ## Additional information - [Power BI documentation](https://learn.microsoft.com/en-us/power-bi/connect-data/) - [DuckDB Power Query Connector](https://github.com/motherduckdb/duckdb-power-query-connector/) - [ODBC](/getting-started/interfaces/client-apis/other/odbc/#authenticating-with-an-access-token), for connecting through a DuckDB DSN instead of the connector and authenticating that DSN with an access token ## Troubleshooting ### Missing VCRUNTIME140.dll If you receive an error about missing `VCRUNTIME140.dll`, you need to install the Microsoft Visual C++ Redistributable. You can download it from [Microsoft's download page](https://www.microsoft.com/en-us/download/details.aspx?id=52685). ### Visual C++ and ODBC issues :::note These steps are particularly relevant for Windows Server environments, especially for Windows Server 2019, but may also help resolve issues on other Windows versions. ::: If you encounter issues with ODBC connectivity or receive errors related to Visual C++ libraries, try these troubleshooting steps: 1. Reinstall the Microsoft Visual C++ Redistributable: - Download the latest version from [Microsoft's official website](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170) for your architecture - Run the installer with administrator privileges - Restart your computer after installation - Try connecting to MotherDuck again 2. If you're still experiencing issues, you can use the ODBC Test tool to diagnose the connection: - Open the ODBC Test tool (typically available in Windows SDK) - Look for a dropdown menu labeled "hstmt 1: ..." - Select this option to run test queries - If queries work in the ODBC Test tool but not in Power BI, this indicates a Power BI-specific configuration issue If you continue to experience problems after trying these steps: - Verify that your MotherDuck token is valid and hasn't expired - Check that your network allows connections to MotherDuck's services - Confirm you have the latest version of the DuckDB Power Query Connector installed If you're still experiencing issues, reach out to us at [support@motherduck.com](mailto:support@motherduck.com) and we'll be happy to help you troubleshoot the issue. --- Source: https://motherduck.com/docs/integrations/bi-tools/powerbi/index # Microsoft Power BI > Power BI is an interactive data visualization product developed by Microsoft. You can connect Power BI to MotherDuck through the built-in PostgreSQL database connector using MotherDuck's Postgres endpoint. ## Included pages - [Power BI Desktop with MotherDuck](https://motherduck.com/docs/integrations/bi-tools/powerbi/powerbi-desktop): Connect Power BI Desktop to MotherDuck using the Postgres endpoint for dashboards and reports. - [Power BI Service with MotherDuck](https://motherduck.com/docs/integrations/bi-tools/powerbi/powerbi-service): Publish Power BI reports to the cloud using the On-Premises Data Gateway and MotherDuck's Postgres endpoint. - [Power BI custom connector (legacy)](https://motherduck.com/docs/integrations/bi-tools/powerbi/powerbi-custom-connector): Connect Power BI to MotherDuck using the DuckDB ODBC driver and Power Query custom connector. --- ## Docs feedback MotherDuck accepts optional user-submitted feedback about this page at `GET https://motherduck.com/docs/api/feedback/agent`. For agents and automated tools, feedback submission should be user-confirmed before sending. URL-encode query parameter values and send a GET request: ```text GET https://motherduck.com/docs/api/feedback/agent?page_path=%2Fintegrations%2Fbi-tools%2F&page_title=MotherDuck%20Documentation%20-%20Business%20Intelligence%20Tools&text= ``` Optionally append `&source=` such as `claude.ai` or `chatgpt`. `page_path` and `text` are required; `page_title` and `source` are optional. Responses: `200 {"feedback_id": ""}`, `400` for malformed query parameters, and `429` when rate-limited.