Database & cloud sources
Connect to MotherDuck
Import any query result from a MotherDuck database as a dataset.
Before you start#
You need a MotherDuck service token (create one in MotherDuck under Settings → Access tokens). The connection field accepts the token in any of these shapes:
motherduck_token=<your-token>— or an md: connection string, or just the bare token pasted on its own.
Connect#
- From your project, select Create Dataset, then the MotherDuck tile under Connect to Database.
- Name the dataset and paste your token.
- Write the SQL query whose result becomes the dataset — qualify tables with the database name, for example
SELECT * FROM my_db.main.orders. - Optionally set a Timestamp column and an AI context hint, then select Import dataset.
Enable incremental refresh#
Set Timestamp column to a growing column in your result. Incremental refreshes append only rows newer than the last run; full refresh remains available either way. See Refresh & scheduled refreshes.
NoteThe import executes on MotherDuck and transfers the result cloud-to-cloud through a temporary export. Because of how that export works, your query can't itself contain
COPY … TOstatements — plainSELECTqueries are the supported shape.