Skip to content

duckcode-ai/DuckCodeModeling-Examples

Repository files navigation

DuckCodeModeling Examples

Official sample projects, reference models, migration patterns, and deployment guides for DuckCodeModeling.

Main Project License Status Discord

Purpose

This repository is the companion examples hub for the DuckCodeModeling product. It is designed to help teams:

  • onboard quickly with production-style starter projects,
  • learn the GitOps-first modeling workflow,
  • adopt connector-specific best practices for Snowflake, Databricks, and BigQuery,
  • standardize model + migration lifecycle in CI/CD.

What You Will Find Here

  • Starter templates: clean repository skeletons for model-driven teams.
  • Connector examples: Snowflake, Databricks, and BigQuery sample modeling flows.
  • Migration patterns: YAML-to-SQL change examples and rollout strategy.
  • CI/CD blueprints: reference workflows for pull request validation and environment promotion.
  • Testing guides: practical validation plans for schema pull, model changes, and migration safety.

Repository Structure

.
├── projects/
│   ├── <project-name>/
│   │   ├── .duckcodemodeling/project.json
│   │   ├── models/
│   │   │   └── *.model.yaml
│   │   ├── ddl/
│   │   │   └── <dialect>/*.sql
│   │   └── migrations/
│   │       └── <dialect>/*.sql
│   └── ...
├── guides/
├── templates/
├── legacy/                # archived experiments (not the recommended layout)
└── .github/workflows/

Included Sample Projects

  • projects/NBA-GAME-SAMPLES/: Snowflake-style sample with multiple model files (DEV/RAW/PUBLIC) + generated baseline DDL.
  • projects/NBA-GAMES-STRUCTURE/: additional Snowflake RAW schema sample (includes FCT_PLAYER_PERFORMANCE).

More details: projects/README.md.

Step-By-Step Tutorial

Start here: guides/tutorial/README.md.

Quick Start (Open Samples In The Product)

  1. Clone this repo.
  2. Start DuckCodeModeling (main product): https://github.com/duckcode-ai/DuckCode-Modeling
  3. In DuckCodeModeling UI: Projects → Add Project Folder
  4. Folder Path:
    • Open an existing sample project: point to .../DuckCodeModeling-Examples/projects/NBA-GAME-SAMPLES
    • Or open the parent folder (one repo, many projects): point to .../DuckCodeModeling-Examples/projects

GitOps-First Workflow (What To Validate While Testing)

DuckCodeModeling treats YAML as the source of truth and generates SQL artifacts for deployment.

  1. Open a model file: projects/NBA-GAME-SAMPLES/models/RAW.model.yaml
  2. Make edits in the UI:
    • Add table
    • Add column, rename column
    • Rename table
  3. Save (Cmd+S / Ctrl+S)
  4. Confirm files updated in the repo:
    • YAML: projects/<project>/models/*.model.yaml
    • Baseline DDL: projects/<project>/ddl/<dialect>/*.sql (auto-generated on save)
  5. Use Diff & Git panel:
    • View diff
    • Commit with a message
    • Push to your remote
  6. Deploy in your CI/CD by applying the generated .sql artifacts to your warehouse.

Workflow Principle

DuckCodeModeling examples follow a programmable data modeling approach:

  • .model.yaml is the source of truth for intent,
  • generated SQL is the deployable artifact,
  • git history + pull requests are the control plane,
  • CI/CD is the execution path to data platforms.

Notes For Testers

  • These projects are meant to be edited inside the DuckCodeModeling product.
  • For new projects, prefer the one repo, many projects approach (projects/<project-name>/...) so teams can manage multiple domains in one repo.

Contributing

Contributions are welcome. For now:

  1. Open an issue describing the sample or guide you want to add.
  2. Create a feature branch.
  3. Add example assets with clear README instructions.
  4. Submit a pull request with expected outputs and validation notes.

Related Repository


Built by DuckCode AI Labs.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors