data-modeling

Featured

Designs the warehouse and semantic layer — source-to-mart structure, dimensional modeling, grain, slowly changing dimensions, and the metric layer analytics reads through. Use this to design or restructure a warehouse, model a new source, decide on grain or table structure, build a semantic or metric layer, or diagnose why queries are slow, wrong, or impossible to write.

AI & Automation 1,356 stars 209 forks Updated 1 weeks ago MIT

Install

View on GitHub

Quality Score: 91/100

Stars 20%
100
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Data modeling ## Layers, and why the middle one matters Three layers, each with one job: 1. **Raw** — source data, append-only, otherwise unmodified. Do not apply *business* logic on ingest: you cannot recover what you discarded, and the logic will need to change retroactively. **Privacy and security transformations are the exception, and belong at ingest.** Credentials and secrets should never land in the warehouse at all. Personal data that is not needed should be dropped rather than stored and governed later, and identifiers you must keep but rarely need in the clear should be tokenized or encrypted on arrival. Retention and deletion apply from ingest, not from the marts. The distinction: strip what you must not hold, keep everything you are entitled to hold, and leave interpretation for later. 2. **Staging** — cleaned and conformed: consistent types, standardized names, deduplicated, no business logic yet. 3. **Marts** — business-facing models shaped for how questions are asked. The discipline that pays is keeping business logic out of layers 1 and 2. Logic embedded in ingestion cannot be changed retroactively, and it will need to change. ## Grain is the decision everything follows from State the grain of every table in one sentence: *one row per what*. "One row per order line per day" is a grain. "Order data" is not. Most modeling errors are grain errors, and they surface as fan-out — a join multiplying rows so every downstream sum i...

Details

Author
cbrock84
Repository
cbrock84/headcount
Created
1 weeks ago
Last Updated
1 weeks ago
Language
Markdown
License
MIT

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category

Data & Documents Listed

dimensional-data-modeling

Designs, reviews, and hardens Kimball-style dimensional models - star schemas, conformed dimensions, bus matrix, slowly changing dimensions. Use when modeling analytical data for a warehouse, lakehouse, or BI semantic layer - declaring a fact table's grain, deciding whether something is a fact or a dimension attribute, picking an SCD type for an attribute that changes, or drafting the bus matrix that makes cross-process reporting reconcile. MUST be used whenever star-schema DDL, a dbt mart, or a model spec is reviewed or handed to an ETL team, because mixed grains, nullable foreign keys and a type 2 dimension keyed on its business key are cheap to catch there and expensive once history is loaded. Ships an offline checker (scripts/dim_check.py).

0 Updated 2 days ago
thefilesareinthecomputer
Data & Documents Listed

dimensional-data-modeling

Designs, reviews, and hardens Kimball-style dimensional models - star schemas, conformed dimensions, bus matrix, slowly changing dimensions. Use when modeling analytical data for a warehouse, lakehouse, or BI semantic layer - declaring a fact table's grain, deciding whether something is a fact or a dimension attribute, picking an SCD type for an attribute that changes, or drafting the bus matrix that makes cross-process reporting reconcile. MUST be used whenever star-schema DDL, a dbt mart, or a model spec is reviewed or handed to an ETL team, because mixed grains, nullable foreign keys and a type 2 dimension keyed on its business key are cheap to catch there and expensive once history is loaded. Ships an offline checker (scripts/dim_check.py).

1 Updated 1 weeks ago
anton-winter-arch
AI & Automation Listed

modeling-dimensional-data

Design analytics data models using dimensional modeling — star and snowflake schemas, fact and dimension tables, grain declaration, surrogate keys, and slowly changing dimensions (SCD Type 1/2/3). Use when designing a warehouse schema, building marts, choosing a table grain, tracking history, or deciding fact vs dimension.

17 Updated 1 weeks ago
Unknown-333