dbt Transformation Patterns

Master dbt (data build tool) for analytics engineering with model organization, testing…

Production-ready dbt patterns for analytics engineering: model organization, testing, documentation, and incremental processing. It structures transformations into clean staging, intermediate, and mart layers, enforces a reference-based lineage graph, and applies incremental strategies that keep large-table builds fast and idempotent.

$15 one-time
Add to a kit →

Prices include 20% VAT. · Forged on real agency work · one-time, no lock-in

  • Type Skill
  • Category Data & Analytics
  • Delivery Email · instant
  • License One-time
Run preview
forgehouse, dbt-transformation-patterns

Inside the run · no black box

See the actual work before you buy it.

Raw tables never jump straight to dashboards. Sources get freshness SLAs, staging stays thin, marts carry the business logic, and every model connects through ref() so the dependency graph always tells the truth.

  1. Defines sources first with a freshness SLA: every source gets a loaded_at field plus warn-after and error-after windows, and dbt source freshness runs on cron so a stalled loader is caught hours in, not when a dashboard looks wrong.
  2. Builds staging models 1:1 with each source, stg_ prefixed, doing only renames, casts and light cleaning; business logic never lives in staging, because skipping the layer and going raw-to-mart is untestable tech debt.
  3. Puts joins and aggregations into intermediate int_ models, then ships final dim_ and fct_ marts; everything connects through ref() and never a hardcoded table name, so the dependency graph stays real and impact analysis (what breaks if I change this) is one command away.
  4. Makes big tables incremental with a mandatory unique_key, a merge strategy for late-arriving data and a lookback window in the is_incremental filter, then proves idempotency by checking that a full refresh and the incremental path produce the same result.
  5. Enforces the data contract in schema yml: unique, not_null, accepted_values, relationships and business-rule expressions on every mart, with dbt build running tests in DAG order in CI so a failing model never deploys.
  6. Extracts repeated SQL into Jinja macros (unit conversions, dev data limiting, schema routing) and checks dbt_utils before writing anything new, so a logic change happens in one place and propagates everywhere.
Use cases · what happens when you plug it in

One power source. 6 lines out.

dbt-transformation-patterns · core

core active · 6 lines

  1. Setting up a dbt project structure across staging, intermediate, and mart layers

    ✓ setting up a dbt project
  2. Defining source freshness checks and schema tests over raw tables

    ✓ defining source freshness
  3. Building incremental models for tables exceeding a million rows

    ✓ building incremental mod…
  4. Creating dimension and fact tables with surrogate keys and relationship tests

    ✓ creating dimension and f…
  5. Extracting repeated SQL logic into reusable Jinja macros

    ✓ extracting repeated sql
  6. Choosing between merge, delete-insert, and insert-overwrite incremental strategies

    ✓ choosing between merge
Benefits · what you walk away with

Yours to keep.

Drag time forward. Watch what stays.

Forever

That's what owning means.

The rented stack

ai writing tool: subscription

expired · access lost

analytics suite: subscription

expired · access lost

design platform: subscription

expired · access lost

(nothing left)

Your forge

  1. Build maintainable, well-layered transformations that avoid raw-to-mart technical debt

    license: perpetual
  2. Keep warehouse compute costs down with incremental builds and dev-environment data limits

    license: perpetual
  3. Catch upstream breakage early with source freshness monitoring and schema tests

    license: perpetual
  4. Guarantee correct rebuilds with idempotent incremental models keyed on a unique column

    license: perpetual

subscriptions expire · deeds don't

What's included · the full manifest

Everything in the box.

Pick a piece up. Watch it work.

A project structure and naming convention across staging, intermediate, and mart layers

part 01 of 06 · in the box

6 parts · one working system · ships instantly by email

Who it's for

This wasn't forged for everyone.

  • Not for you if you'd rather rent a tool than own one.
  • Not for you if you want someone else to run your stack.
  • Not for you if you're happy guessing.
Still here? Good.

Analytics engineers and data developers building and maintaining transformation pipelines with dbt.

then this was forged for you.

Works with

Universal by design: these run in any AI. Delivered in the open Agent Skills + MCP format (native in Claude); ChatGPT, Gemini, Cursor and Copilot adapt the same files their own way.

  • Claude Native format
  • ChatGPT Adapts via open standards
  • Gemini Adapts via open standards
  • Cursor Adapts via open standards
  • Copilot Adapts via open standards
Questions · still in the air

Catch what's on your mind.

the air is clear. nothing between you and the forge.
catch a spark: the forge will answer

  1. We already have a messy dbt project. Do these patterns help refactor it, or only apply to a fresh build?

    The staging, intermediate, and mart layering and reference-based lineage are meant to be imposed on existing models, not just greenfield ones. You can reorganize a tangled project toward this structure incrementally, model by model.

  2. When do incremental models actually pay off versus a full refresh?

    Incremental earns its keep once tables grow large enough that a full rebuild is slow, the example being tables past a million rows. Below that, a full refresh is simpler and the incremental bookkeeping is not worth the complexity.

  3. Does it set up dbt and the warehouse, or assume they are running?

    It assumes dbt and a warehouse are already in place and gives you the patterns to organize and test on top. Choosing or provisioning the warehouse, and the raw data ingestion feeding it, sit outside this scope.

  4. How is it delivered?

    By email right after purchase: ready to run, downloaded instantly, no setup wait.

  5. One-time or subscription?

    A one-time purchase; no subscription or hidden fees. VAT (20%) is included.

  6. Can I get a refund?

    As a digital product, it can’t be refunded once downloaded. That’s why we show exactly what’s inside and who it’s for, right here.