Skip to main content

MotherDuck - Download Query Results to Platform

Overview​

Quickly download the results of a DuckDB query to Platform. The target file can either be a CSV or Parquet file.

Variables​

NameReferenceTypeRequiredDefaultOptionsDescription
Access TokenMOTHERDUCK_TOKENPasswordβœ…--The API token for programmatic access to MotherDuck
QueryMOTHERDUCK_QUERYAlphanumericβœ…--The SQL query to fetch results for
DatabaseMOTHERDUCK_DATABASEAlphanumericβž–--The optional database to connect to
File TypeMOTHERDUCK_FILE_TYPESelectβœ…csvCSV: csv

Parquet: parquet

The file type of the target file
Shipyard File NameMOTHERDUCK_FILEAlphanumericβœ…--The name of the file with the query results
Shipyard Folder NameMOTHERDUCK_FOLDERAlphanumericβž–--The optional directory to be used to download the query results to

YAML​

Below is the YAML template for this Blueprint and can be used in the Fleet YAML Editor.

source:
blueprint: MotherDuck - Download Query Results to Shipyard
inputs:
MOTHERDUCK_TOKEN: null ## REQUIRED
MOTHERDUCK_QUERY: null ## REQUIRED
MOTHERDUCK_DATABASE: null
MOTHERDUCK_FILE_TYPE: csv ## REQUIRED
MOTHERDUCK_FILE: null ## REQUIRED
MOTHERDUCK_FOLDER: null
type: BLUEPRINT
guardrails:
retry_count: 1
retry_wait: 0h0m0s
runtime_cutoff: 1h0m0s
exclude_exit_code_ranges:
- '200'
- '222'
- '249'