MotherDuck Input
Reads rows from MotherDuck cloud tables via the MotherDuck REST API.
How it works
- Authenticates with MotherDuck using a bearer token.
- Queries specified tables or executes a custom SQL query via
POST https://api.motherduck.com/v1/sql. - Response rows are serialized to JSON and ingested through the standard WAL pipeline.
- Namespace convention:
motherduck.{database}.{table_name}.
Configuration
yaml
data_sources:
source:
Motherduck:
motherduck_token: "ey..."
database: "my_database"
tables: ["users", "events"]Configuration variables
| Variable | Default | Description |
|---|---|---|
motherduck_token / MOTHERDUCK_TOKEN | (required) | MotherDuck auth token |
database | MotherDuck database name | |
tables | List of tables to read | |
query | Custom SQL query (overrides tables) | |
batch_size_rows | 10000 | Rows per ingest batch |
format | json | Data format |
Authentication
For security best practices, we strongly advise against storing the token in skippr.yml. Use environment variable interpolation instead: replace the motherduck_token value with your own ${ENV_VAR} reference.
The relevant part of skippr.yml looks like this:
yaml
data_sources:
source:
Motherduck:
motherduck_token: "${MOTHERDUCK_TOKEN}"Set the env var before running skipprd:
macOS / Linux
bash
export MOTHERDUCK_TOKEN="md:..."Windows PowerShell
powershell
$env:MOTHERDUCK_TOKEN = "md:..."Windows Command Prompt
cmd
set MOTHERDUCK_TOKEN=md:...bash
export MOTHERDUCK_TOKEN="md:..."Troubleshooting
| Symptom | Fix |
|---|---|
| authentication failed | Verify MOTHERDUCK_TOKEN and confirm the token still has access to the selected database. |
| tables not found | Check the database name and table list or query. |
