# MotherDuck

This guide will walk you through connecting Datawisp to your existing MotherDuck database. To get started, head over to <https://app.motherduck.com/settings/tokens> and click **+ Create token**.

<figure><img src="/files/tGJtp4lWbTBQgtlHYA7A" alt=""><figcaption></figcaption></figure>

The *Token type* should be set to **Read Scaling Token** as Datawisp will never write to your database.

After clicking **Create token**, copy the generated token and head back to [Datawisp](https://app.datawisp.io/my-datasources).

Head over to the Data Sources page and press **Import**.

<figure><img src="/files/K52fJaDm3oa5d0VCpmeK" alt=""><figcaption></figcaption></figure>

Select **Database** and change the *Connection type* to **MotherDuck**.

<figure><img src="/files/sskzclEyaPfUyL8bGhPU" alt="" width="563"><figcaption></figcaption></figure>

Choose a *Title* for the datasource. Under *Token,* paste the access token you just created. For *Database* enter the name of the MotherDuck database database that you want to connect to.&#x20;

Then click **Connect**.

![](https://md.statshelix.com/uploads/a1fd0fba00c538a8090828b11.png)

If everything worked, Datawisp will tell you that the connection to your MotherDuck database was successful:

<figure><img src="/files/lBuiUMTQ6wvW6rasqQzS" alt="" width="563"><figcaption></figcaption></figure>


---

# Agent Instructions: 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.datawisp.io/adding-your-data/connect-to-a-database/motherduck.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.
