---
sidebar_position: 1
title: Retool
description: Connect Retool to MotherDuck to build internal tools and dashboards powered by your cloud data warehouse.
---

[Retool](https://retool.com/) is a low-code platform for building internal tools and custom business applications with drag-and-drop UI components.

There are two ways to connect Retool to MotherDuck, depending on whether you use Retool Cloud or self-hosted Retool.

## Retool Cloud (native connector)

Retool Cloud has a native MotherDuck resource type. To connect:

1. Go to **Resources** and select **Create new** > **Resource**.
2. Search for **MotherDuck** and select it.
3. Give the resource a descriptive name (for example, "MotherDuck analytics").
4. Under **Resource credentials**, enter your [MotherDuck access token](/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck/#creating-an-access-token).
5. Optionally enter a **Database name**. Leave it empty to use workspace mode, which lets you query across multiple databases.
6. Click **Test connection**, then **Create resource**.

You can use this resource in your Retool apps to run SQL queries against your MotherDuck databases. The resource supports both SQL mode for reading data and GUI mode for write operations (insert, update, delete, upsert).

### Connection options

You can pass optional key-value pairs under **Connection options** to customize behavior:

| Option | Values | Description |
|--------|--------|-------------|
| `access_mode` | `READ_WRITE`, `READ_ONLY` | Controls whether the connection can write data |
| `attach_mode` | `single`, `default` | Controls how databases are attached |
| `TimeZone` | For example, `UTC`, `America/New_York` | Sets the session time zone |
| `default_null_order` | `NULLS_FIRST`, `NULLS_LAST` | Default null ordering for queries |
| `default_order` | `ASC`, `DESC` | Default sort order for queries |

For more details, see the [Retool MotherDuck documentation](https://docs.retool.com/data-sources/guides/connect/motherduck).

### Known limitations

- `BLOB` and `ARRAY` column types are not supported by the native connector. Queries that return these types will fail. Cast these columns to a supported type (for example, using `CAST` or `list_string_agg`) or exclude them from your result set.

## Self-hosted (JDBC)

If you run a self-hosted Retool instance, you can connect to MotherDuck through the [DuckDB JDBC driver](/integrations/language-apis-and-drivers/jdbc-driver/). Your instance needs network access to `motherduck.com` over HTTPS (port 443).

1. In your Retool instance, go to **Resources** and select **Create new**.
2. Choose **JDBC** as the resource type.
3. Use the following JDBC connection string:

   ```text
   jdbc:duckdb:md:<database_name>?motherduck_token=<your_token>
   ```

   Replace `<database_name>` with your MotherDuck database and `<your_token>` with your [access token](/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck/#creating-an-access-token).

4. Test the connection and save.

For more details on the JDBC driver, see [JDBC driver](/integrations/language-apis-and-drivers/jdbc-driver/).
