> For the complete documentation index, see [llms.txt](https://docs.zenlytic.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zenlytic.com/data-sources/motherduck_setup.md).

# Motherduck Setup

To connect Zenlytic to MotherDuck, you'll need to configure the connection using a service token. Here's how to do it:

## Step 1: Create a Service Token

1. Log into your MotherDuck account
2. Go to Settings > Service Tokens
3. Click "Create Service Token"
4. Give it a name (e.g., "Zenlytic Integration")
5. Set appropriate permissions (read access to your databases)
6. Click "Create"
7. Copy the token (you won't be able to see it again)

## Step 2: Add the Connection in Zenlytic

1. In Zenlytic, go to Settings > Data Sources
2. Click "Add Data Source"
3. Select "MotherDuck" from the list
4. Enter the connection details:
   * **Service Token**: The token you generated
   * **Database**: Your database name (optional, can be specified later)

![Motherduck Setup 1](/files/YkTU4MF60LA9eISFGCXy)

## Step 3: Test Your Connection

1. Click "Test Connection" to verify it works
2. If successful, click "Save"
3. You should now be able to see your MotherDuck tables in Zenlytic

## Troubleshooting

If you encounter connection issues:

1. Verify the service token is correct
2. Check that the token has the necessary permissions
3. Ensure the database name is correct (if specified)
4. Verify your MotherDuck account is active


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zenlytic.com/data-sources/motherduck_setup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
