Design and build database schemas and data models in MotherDuck. Produces a file-based SQL project scaffold with a model manifest. Use for any schema design or data modeling task - creating tables, choosing data…
---
name: motherduck-model-data
description: Design and build database schemas and data models in MotherDuck. Produces a file-based SQL project scaffold with a model manifest. Use for any schema design or data modeling task — creating tables, choosing data types, star schemas, wide denormalized tables, raw/staging/analytics layers, dbt-style transformation projects, or restructuring data for analytics workloads.
license: MIT
---
# Model Data in MotherDuck
Use this skill when creating data models, tables, designing schemas, choosing data types, defining relationships between tables, or restructuring data for analytical workloads.
## Core Behavior
**When a user asks questions like "build a data model", "model my data", or "create a transformation layer", the default output is a file-based project scaffold — not just SQL executed directly in the warehouse.**
The project scaffold includes:
- **SQL files** organized by lifecycle stage (`raw/`, `staging/`, `analytics/`)
- **A manifest** (`model_manifest.yml`) defining the DAG: model names, dependencies, materialization strategy, and target database
This is a lightweight framework-agnostic convention for organizing SQL transformations that can be reviewed, versioned, and rerun.
## Prerequisites
- MotherDuck connection established via `motherduck-connect`
- Existing source shape understood via `motherduck-explore`