Dbt Transformation Patterns
Unverified●30/40Claude Code◐PartialHas SKILL.md but declares no allowed-tools — Claude Code will ask for permission each time
Cursor◐PartialPlain prose you can paste in — but no Cursor rules file
Codex◐PartialPlain prose you can paste in — but no AGENTS.md
Gemini CLI◐PartialPlain prose you can paste in
Copilot◐PartialPlain prose you can paste in — but no Copilot instructions file
npx agentalley add dbt-transformation-patternsWho is stuck, and on what
Master dbt (data build tool) for analytics engineering with model organization, testing, documentation, and incremental strategies. Use when building data transformations, creating data models, or implementing analytics engineering best practices.
The whole source
Frontmatter — 2 properties
| name | dbt-transformation-patterns |
|---|---|
| description | Master dbt (data build tool) for analytics engineering with model organization, testing, documentation, and incremental strategies. Use when building data transformations, creating data models, or implementing analytics engineering best practices. |
| 1 | --- |
| 2 | name: dbt-transformation-patterns |
| 3 | description: Master dbt (data build tool) for analytics engineering with model organization, testing, documentation, and incremental strategies. Use when building data transformations, creating data models, or implementing analytics engineering best practices. |
| 4 | ---A5 — No allowed-tools declared — no way to tell what this skill may touch |
| 5 | |
| 6 | # dbt Transformation Patterns |
| 7 | |
| 8 | Production-ready patterns for dbt (data build tool) including model organization, testing strategies, documentation, and incremental processing. |
| 9 | |
| 10 | ## When to Use This Skill |
| 11 | |
| 12 | - Building data transformation pipelines with dbt |
| 13 | - Organizing models into staging, intermediate, and marts layers |
| 14 | - Implementing data quality tests |
| 15 | - Creating incremental models for large datasets |
| 16 | - Documenting data models and lineage |
| 17 | - Setting up dbt project structure |
| 18 | |
| 19 | ## Core Concepts |
| 20 | |
| 21 | ### 1. Model Layers (Medallion Architecture) |
| 22 | |
| 23 | ``` |
| 24 | sources/ Raw data definitions |
| 25 | ↓ |
| 26 | staging/ 1:1 with source, light cleaning |
| 27 | ↓ |
| 28 | intermediate/ Business logic, joins, aggregations |
| 29 | ↓ |
| 30 | marts/ Final analytics tables |
| 31 | ``` |
| 32 | |
| 33 | ### 2. Naming Conventions |
| 34 | |
| 35 | | Layer | Prefix | Example | |
| 36 | | ------------ | -------------- | ----------------------------- | |
| 37 | | Staging | `stg_` | `stg_stripe__payments` | |
| 38 | | Intermediate | `int_` | `int_payments_pivoted` | |
| 39 | | Marts | `dim_`, `fct_` | `dim_customers`, `fct_orders` | |
| 40 | |
| 41 | ## Quick Start |
| 42 | |
| 43 | ```yaml |
| 44 | # dbt_project.yml |
| 45 | name: "analytics" |
| 46 | version: "1.0.0" |
| 47 | profile: "analytics" |
| 48 | |
| 49 | model-paths: ["models"] |
| 50 | analysis-paths: ["analyses"] |
| 51 | test-paths: ["tests"] |
| 52 | seed-paths: ["seeds"] |
| 53 | macro-paths: ["macros"] |
| 54 | |
| 55 | vars: |
| 56 | start_date: "2020-01-01" |
| 57 | |
| 58 | models: |
| 59 | analytics: |
| 60 | staging: |
| 61 | +materialized: view |
| 62 | +schema: staging |
| 63 | intermediate: |
| 64 | +materialized: ephemeral |
| 65 | marts: |
| 66 | +materialized: table |
| 67 | +schema: analytics |
| 68 | ``` |
| 69 | |
| 70 | ``` |
| 71 | # Project structure |
| 72 | models/ |
| 73 | ├── staging/ |
| 74 | │ ├── stripe/ |
| 75 | │ │ ├── _stripe__sources.yml |
| 76 | │ │ ├── _stripe__models.yml |
| 77 | │ │ ├── stg_stripe__customers.sql |
| 78 | │ │ └── stg_stripe__payments.sql |
| 79 | │ └── shopify/ |
| 80 | │ ├── _shopify__sources.yml |
| 81 | │ └── stg_shopify__orders.sql |
| 82 | ├── intermediate/ |
| 83 | │ └── finance/ |
| 84 | │ └── int_payments_pivoted.sql |
| 85 | └── marts/ |
| 86 | ├── core/ |
| 87 | │ ├── _core__models.yml |
| 88 | │ ├── dim_customers.sql |
| 89 | │ └── fct_orders.sql |
| 90 | └── finance/ |
| 91 | └── fct_revenue.sql |
| 92 | ``` |
| 93 | |
| 94 | ## Detailed patterns and worked examples |
| 95 | |
| 96 | Detailed pattern documentation lives in `references/details.md`. Read that file when the navigation tier above is insufficient. |
| 97 | |
| 98 | ## Best Practices |
| 99 | |
| 100 | ### Do's |
| 101 | |
| 102 | - **Use staging layer** - Clean data once, use everywhere |
| 103 | - **Test aggressively** - Not null, unique, relationships |
| 104 | - **Document everything** - Column descriptions, model descriptions |
| 105 | - **Use incremental** - For tables > 1M rows |
| 106 | - **Version control** - dbt project in Git |
| 107 | |
| 108 | ### Don'ts |
| 109 | |
| 110 | - **Don't skip staging** - Raw → mart is tech debt |
| 111 | - **Don't hardcode dates** - Use `{{ var('start_date') }}` |
| 112 | - **Don't repeat logic** - Extract to macros |
| 113 | - **Don't test in prod** - Use dev target |
| 114 | - **Don't ignore freshness** - Monitor source data |
| 115 |
Reviews
Installed this one?Write the first review and take the Trailblazer badge.
Alternatives
Task Coordination StrategiesDecompose complex tasks, design dependency graphs, and coordinate multi-agent work with proper task descriptions and workload balancing. Use this skill when breaking down work for agent teams, managing task dependencies, or monitoring team progress.◐◐◐◐◐●35/40Ebay Seller Tools·····●34/40Tough Decision Advisor: Every Angle ConsideredHand in a decision you're stuck on. Get back a clear breakdown of every angle — the trade-offs, the risks, the blind spot, and a recommended path.●····●32/40DHDNA Profiler — Cognitive Pattern ExtractionPaste any email, proposal, or note someone wrote, and get back a plain-language read on how they think, what drives their decisions, and how they communicate.●····●32/40