From vibedata-dbt-skills
Practitioner-level dbt patterns for Microsoft Fabric. Covers materialization decisions, incremental model gotchas, snapshot strategies, selector/tag patterns, ref() chain rules, and Fabric-specific T-SQL quirks. Use when writing, reviewing, or debugging dbt models on Fabric. Also use when setting up dbt_project.yml configuration or CI/CD pipelines for dbt-fabric projects.
How this skill is triggered — by the user, by Claude, or both
Slash command
/vibedata-dbt-skills:dbt-fabric-patternsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Hard-to-find patterns for running dbt on Microsoft Fabric. Focuses on what Context7 and official docs don't cover well: Fabric-specific divergences, common LLM mistakes, and decision frameworks for materialization, incremental models, and snapshots.
Hard-to-find patterns for running dbt on Microsoft Fabric. Focuses on what Context7 and official docs don't cover well: Fabric-specific divergences, common LLM mistakes, and decision frameworks for materialization, incremental models, and snapshots.
The patterns most likely to prevent mistakes:
| Layer | Default | When to change |
|---|---|---|
Staging (stg_) | view | Never — staging is always a view |
Intermediate (int_) | view | Use table if query is expensive and referenced multiple times. Never ephemeral — unsupported on Fabric |
Marts (fct_/dim_) | table | Use incremental when source volume exceeds ~1M rows or query time exceeds 60s |
| Snapshots | snapshot | Always — this is a dedicated materialization type |
Before writing an incremental model, answer these:
unique_key? Single column preferred. Composite keys need ALL columns — omitting one causes silent duplicates.merge on Fabric. It requires unique_key.is_incremental() is false on first run. Late-arriving data needs a lookback buffer (typically 3 days).--full-refresh when adding columns. Schedule periodic full refreshes.source() → stg_ → int_ → fct_/dim_
↑ ↑
ONLY layer that Can ref other marts
uses source() (no circular refs)
source() is used ONLY in staging models. Everything else uses ref().{{ ref('other_project', 'model_name') }}.| Pattern | Snowflake/Postgres | Fabric |
|---|---|---|
| Ephemeral models | Supported | Unsupported — use views instead |
| Utils package | dbt-utils | tsql-utils — different macro signatures |
| Authentication | Various | ServicePrincipal only — no SQL auth |
| Table format | Various | Delta mandatory |
| Write path | Direct SQL | SQL analytics endpoint is read-only — dbt writes via the warehouse endpoint |
What LLMs consistently get wrong with dbt on Fabric:
dbt-utils on Fabric — must use tsql-utils. Macro names look similar but signatures differ.source() outside staging — only stg_ models use source(). Marts use ref().stg_stripe__payments (double underscore separates source from entity).dbt run + dbt test in CI — use dbt build which runs in DAG order.unique_key in incremental — Fabric merge strategy requires it. Without it, every run appends duplicates.For deeper guidance on specific patterns:
npx claudepluginhub accelerate-data/vibedata-official --plugin vibedata-dbt-skillsMines projects and conversations into a searchable memory palace. Activates on queries about MemPalace, memory palace, mining, searching, palace setup, wings, rooms, drawers, or recalling past work.
Whole-repo audit for over-engineering: finds dead code, unnecessary abstractions, stdlib-replaceable dependencies. Outputs ranked findings and net line/dep savings.