motherduck-migrate-to-motherduck

Plan phased migrations from Snowflake, Redshift, or PostgreSQL onto MotherDuck with validation and rollback.

Updated Oct 15, 2019
One-click install
npx skills add https://github.com/kkkaoru/dotfiles --skill motherduck-migrate-to-motherduck-kkkaoru
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: motherduck-migrate-to-motherduck
Source: https://github.com/kkkaoru/dotfiles/tree/main/.agents/skills-stroage/motherduck-migrate-to-motherduck
Command: npx skills add https://github.com/kkkaoru/dotfiles --skill motherduck-migrate-to-motherduck-kkkaoru

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires duckdb, and includes references (resource) components.

What problem does it solve? Moving an existing warehouse, PostgreSQL estate, or lakehouse stack onto MotherDuck involves hard decisions about target patterns, cutover sequencing, SQL dialect porting, and rollback. This Skill produces a structured migration plan instead of an ad-hoc list of copy commands. ## Core Features & Use Cases - Target Pattern Selection: Decides between native MotherDuck storage, pg_duckdb, and DuckLake based on the source system and serving workload. - Phased Cutover Planning: Sequences migration slices with source-vs-target validation, explicit variance thresholds, and rollback checkpoints. - Validation Toolkit: Ships SQL patterns and runnable Python/TypeScript artifacts for row counts, metric variance, uniqueness, and new/deleted/changed record tracking. - Use Case: A team leaving Snowflake asks for a migration plan; the Skill classifies the workload, inspects the live MotherDuck target, and returns the target pattern, migration sequence, validation plan, rollback path, and first cutover slice. ## Quick Start Ask the assistant to plan a migration from your current warehouse or PostgreSQL database to MotherDuck, naming the source platform and target database.

Frequently Asked Questions about motherduck-migrate-to-motherduck

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

FAQPage Schema
How do I plan a migration from Snowflake to MotherDuck?

Classify the workload, pick a target pattern (native MotherDuck storage by default), move data in bulk via Parquet or object storage, rebuild the analytical model in DuckDB SQL, then validate and cut over one workload at a time with rollback checkpoints.

When should I use pg_duckdb versus native MotherDuck storage?

Use pg_duckdb when extending an existing PostgreSQL estate is the least disruptive path, keeping OLTP in PostgreSQL while offloading analytics. Use native MotherDuck storage for cleaner warehouse-style landings and simpler managed operation.

How do I validate data after migrating to MotherDuck?

Run source-vs-target checks comparing row counts, SUM/AVG/MIN/MAX metrics with percent variance, uniqueness, and new/deleted/changed records via EXCEPT queries or row hashing. The included Python orchestrator runs all checks and reports pass/fail against a variance threshold.

Does the MotherDuck PG endpoint run PostgreSQL SQL?

No. The PG endpoint still runs DuckDB SQL, not PostgreSQL SQL. PostgreSQL-specific syntax, temp-table habits, local-file imports, and extension management will not survive unchanged over the PG endpoint.

When should I use DuckLake instead of native MotherDuck storage?

Use DuckLake only when open-table-format interoperability, bring-your-own-bucket storage ownership, or migration from Iceberg-oriented lake workflows is an explicit requirement. Native MotherDuck storage is simpler and often materially faster for normal analytical reads.