Skip to content
Back to skills

Data Modeling

ASecurity

Guides warehouse data modeling with a Kimball/wide-table/Data Vault decision tree, medallion dbt layering, and fact table templates; use when designing a warehouse schema, choosing a modeling approach, or refactoring an existing model.

  • 19 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 19, 2026
ai-agentssqlrefactoringapi

Works with

  • api

Security analysis

A100/100

Scanned October 19, 2026

npx -y skills add sawrus/agent-guides --skill data-modeling --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Data Modeling?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Data Modeling
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/sawrus-data-modeling/badge)](https://www.skillsdirectory.com/skills/sawrus-data-modeling)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: data-modeling
description: "Guides warehouse data modeling with a Kimball/wide-table/Data Vault decision tree, medallion dbt layering, and fact table templates; use when designing a warehouse schema, choosing a modeling approach, or refactoring an existing model."
---

# Skill: Data Modeling

## When to load

When designing a warehouse schema, choosing between modeling approaches, or refactoring an existing model.

## Approach Decision Tree

```
Primary consumer?
  → BI tools + analysts: Kimball (dimensional)
  → Data science + ML: Wide denormalized tables
  → Multiple teams: Data Vault

History tracking?
  → Never/rarely: Type 1 SCD (overwrite)
  → Track current + previous: Type 2 SCD (versioned rows)

Scale?
  → < 100 GB: Simple star schema
  → 100 GB – 10 TB: Partitioned star schema
  → > 10 TB: Data Vault or Lakehouse (Delta/Iceberg)
```

## dbt Layering (Medallion Architecture)

```
sources/       ← Raw data as-is from source systems
staging/       ← Cleaned, renamed, typed. 1:1 with source tables.
intermediate/  ← Business logic, joins. Not exposed directly.
marts/         ← Dimensional models for specific use cases
  ├── core/    ← fct_*, dim_*
  └── finance/ ← rpt_*
```

## Fact Table Template

```sql
CREATE TABLE fct_orders (
    order_key    BIGINT PRIMARY KEY,  -- surrogate key
    order_id     VARCHAR NOT NULL,    -- natural key
    user_key     BIGINT REFERENCES dim_users(user_key),
    date_key     INT REFERENCES dim_date(date_key),
    quantity     INT NOT NULL,
    total_amount NUMERIC(10,2) NOT NULL,
    loaded_at    TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    source_system VARCHAR DEFAULT 'orders-api'
);
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.