MotherDuck - Download Query Results to Workflows
Overview
Quickly download the results of a DuckDB query to Workflows. The target file can either be a CSV or Parquet file.
Variables
Name | Reference | Type | Required | Default | Options | Description |
---|---|---|---|---|---|---|
Access Token | MOTHERDUCK_TOKEN | Password | ✅ | - | - | The API token for programmatic access to MotherDuck |
Query | MOTHERDUCK_QUERY | Alphanumeric | ✅ | - | - | The SQL query to fetch results for |
Database | MOTHERDUCK_DATABASE | Alphanumeric | ➖ | - | - | The optional database to connect to |
File Type | MOTHERDUCK_FILE_TYPE | Select | ✅ | csv | CSV: csv Parquet: parquet | The file type of the target file |
Workflows File Name | MOTHERDUCK_FILE | Alphanumeric | ✅ | - | - | The name of the file with the query results |
Workflows Folder Name | MOTHERDUCK_FOLDER | Alphanumeric | ➖ | - | - | The optional directory to be used to download the query results to |
YAML
Below is the YAML template
source:
template: MotherDuck - Download Query Results to Workflows
inputs:
MOTHERDUCK_TOKEN:
MOTHERDUCK_QUERY:
MOTHERDUCK_DATABASE:
MOTHERDUCK_FILE_TYPE: csv
MOTHERDUCK_FILE:
MOTHERDUCK_FOLDER:
type: TEMPLATE
guardrails:
retry_count: 1
retry_wait: 0h0m0s
runtime_cutoff: 1h0m0s
exclude_exit_code_ranges:
- 200
- 222
- 249