motherduck-load-data

Load data into MotherDuck from files, object storage, dataframes, and external databases.

9|Updated Feb 16, 2026
One-click install
npx skills add https://github.com/mathisdrn/orca --skill motherduck-load-data-mathisdrn
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: motherduck-load-data
Source: https://github.com/mathisdrn/orca/tree/main/.agents/skills/motherduck-load-data
Command: npx skills add https://github.com/mathisdrn/orca --skill motherduck-load-data-mathisdrn

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Getting data into MotherDuck correctly requires choosing the right loading path for each source type, and picking the wrong one leads to failed loads, slow transfers, or unsupported operations on the Postgres endpoint. ## Core Features & Use Cases - Source-aware loading paths: Classifies sources as object storage/HTTPS, local files, local DuckDB databases, in-memory dataframes, or external databases, then selects CTAS, INSERT...SELECT, COPY, or bulk upload accordingly. - Client path guidance: Distinguishes native DuckDB client workflows from Postgres-endpoint thin-client workflows so local-file COPY, CREATE SECRET, and database uploads are never attempted over the wrong interface. - Format and cloud coverage: Reference material covers CSV, Parquet, JSON, Delta Lake, and Iceberg options plus S3, GCS, and Azure authentication secrets. - Use Case: You have a folder of Parquet files in S3 and a local .duckdb file to consolidate. The skill directs the S3 data through a remote-read CTAS and uploads the local database with CREATE OR REPLACE DATABASE FROM, then validates row counts. ## Quick Start Load the CSV files from my S3 bucket into a new MotherDuck staging table and validate the row counts.

Frequently Asked Questions about motherduck-load-data

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I load CSV or Parquet files into MotherDuck?▼

Use CREATE TABLE AS SELECT with read_csv or read_parquet pointing at your file path or S3 URL for first loads, and INSERT INTO ... SELECT for appends. Prefer Parquet over CSV for large bulk loads since it reads faster and preserves types.

Should I use the MotherDuck Postgres endpoint or a DuckDB client for ingestion?▼

Use a native DuckDB client for local files, CREATE SECRET, dataframe registration, and local DuckDB database uploads. Use the Postgres endpoint only for remote-read CTAS or batched multi-row inserts against files already in object storage or HTTPS.

How do I upload a local DuckDB database to MotherDuck?▼

Attach 'md:' from a native DuckDB client, then run CREATE OR REPLACE DATABASE remote_name FROM CURRENT_DATABASE(), from an attached local database, or directly from a file path. This is not supported over the Postgres endpoint.

Can MotherDuck read Delta Lake and Iceberg tables?▼

Yes, MotherDuck includes pre-installed delta and iceberg extensions. Use delta_scan or iceberg_scan against the table path in object storage, optionally filtering with WHERE during the CTAS to limit the loaded data.

Why does my MotherDuck load fail with type mismatch errors?▼

Type mismatches happen when source and target schemas differ. Compare both with DESCRIBE, then cast columns explicitly in the INSERT SELECT, or load CSV with all_varchar = true and cast in a follow-up cleaning step.

When should I not use the Postgres endpoint for loading data?▼

Avoid the Postgres endpoint for local-file COPY, CREATE SECRET, local DuckDB attachments, and extension-based workflows, since it is a thin SQL submission path. Switch to a native DuckDB client for anything touching local disk or memory.