Skip to content

Connect to DuckDB (MotherDuck)

4 min read · Updated 23 Nov 2026

The DuckDB source connects Astrato to MotherDuck. When you finish, the connection appears in Data & AI → Data Connections and you can build a semantic layer on it. The form is the one described in Data connections; this page covers what is specific to MotherDuck.

  • Astrato permission. You need a workspace role that can create data connections: Owner, Admin or Creator. See Create a connection for how to check your role.
  • A MotherDuck service token. Create one in MotherDuck under Settings → Tokens; see MotherDuck’s documentation for token types and expiry. The token is the only credential Astrato asks for.

You do not need the database’s name: after validating, you choose it from the databases the token can reach.

  1. Open Data & AI → Data Connections, select New connection and choose DuckDB. The panel becomes New DuckDB connection.
  2. Under Authentication, paste the token into Service token. There is no host, port or database to enter.
  3. If your workspace shows Deployment Region, choose one or leave it for now; see Choose a Deployment Region.
  4. Select Validate Connection. The Validation result reads “Connected to DuckDB in n ms.”
  5. Under Data to use, choose a Database from the ones the token can reach.
  6. Review the Connection name, select Save connection, then choose a schema or leave it for later and select Finish.

The New DuckDB connection panel with a masked Service token as its only credential, a Validation result reading Connected to DuckDB in 180 ms, Database analytics chosen under Data to use, and Connection name Product analytics above Save connection

A saved DuckDB connection cannot be edited: its row has no Edit connection, only Properties, where you can change its name, description and, where it is shown, its Deployment Region. Its token cannot be replaced there.

Before you start: create a new token in MotherDuck, and check that your workspace role can create data connections and that you can edit the semantic layers that use the old connection.

  1. Create a new DuckDB connection with the new token, as in Create the connection.
  2. On the new connection’s Manage Access tab, give the same people, groups and roles the access they had on the old one; a connection carries its own access, separate from the layer’s. Do this before you move any layer, so nobody loses access to its data once the layer uses the new connection. See Manage resource access.
  3. Open each semantic layer that used the old connection and move it to the new one. Publishing releases every edit in the layer, not only the connection change, so review any unpublished edits first. In the editor’s header, open Data Connection, pick the new connection and select Confirm. This saves the layer and publishes a new version before the editor reloads; if publishing fails, the editor shows an error and the layer stays saved on the new connection but unpublished. If the editor instead shows a notice that the old connection failed, select Choose connection under Choose another connection and pick the new connection there. That switches the connection and saves the layer, then reloads, without publishing a new version.
  4. Make sure each layer’s published version uses the new connection: if you switched a layer with Choose connection, or its publish after Confirm failed, select Publish in that layer’s editor, which also releases the layer’s other unpublished edits. Then, once no semantic layer uses the old connection, delete it.
Symptom Fix
Validation fails Check that the token is complete and has not expired or been revoked in MotherDuck; if it has, create a new one and paste it
“This credential reported no databases. Check its grants, or validate again.” The token reached no database. Validate again; if the list stays empty, check in MotherDuck which databases the token can open
A saved connection stops working because the token expired or was revoked Replace the token

When a data connection will not validate explains every notice the panel shows.