internalsGet Pro

Data Engineering · Module 05

Data modeling for analytics

Lessons
12
Free
0
Reading
~3 h

Your progress

0 / 12 lessons done

Sign in to track

Lessons

  1. Why data modeling matters for analyticsEvery analytics team reaches the meeting where two dashboards show two revenue numbers. The fix is rarely better SQL; it is deciding which tables everyone reads and what each row in them means.13 min
  2. Normalized vs denormalized tablesEvery analytical table starts from an app’s normalized tables and decides which joins to do ahead of time. Copy the wrong column and a rename quietly splits a report; refuse to copy anything and every analyst rewrites the same four joins.14 min
  3. Dimensional modeling: facts and dimensionsMost warehouses, dbt projects and dashboard tools expect data laid out as facts and dimensions. Where each column goes decides whether a new question is one query or a new pipeline step, and whether the totals people read are right.17 min
  4. Star and snowflake schemasEvery report, dashboard and ad hoc query joins the fact table to its dimensions. The shape of those dimensions decides how many joins each query needs, how many places rows can silently disappear, and how easily analysts write correct SQL.18 min
  5. Grain: deciding what one row meansEvery fact table starts with a promise about what one row is. When a column breaks that promise, sums double, averages drift and categories steal each other’s revenue, with no error anywhere. Data engineers make this choice on every new table, and it is the hardest one to change later.16 min
  6. Slowly changing dimensions: types 1, 2 and 3Customers move, products change category and labels get renamed. Every dimension a data engineer builds needs a rule for what happens to past reports when that happens, and the wrong rule changes last month’s numbers with no error anywhere.17 min
  7. Wide tables: when one big table worksMany readers of analytical data can’t or won’t write joins: a reporting tool’s explore screen, a spreadsheet export, a training-data pull. A wide table built from the star serves them, and a data engineer has to know what it costs to keep correct and when it stops being worth it.17 min
  8. Data vault: modeling for constant changeSome teams adopt a data vault because it promises full history and easy new sources, then find their analysts lost in joins. Knowing what it buys and what it costs lets you pick it when many changing sources and audits demand it, and skip it when one database feeds a star schema well.18 min
  9. Modeling events and clickstreamsClick events are the biggest table most data teams own, and the one every product question touches. How you shape them decides whether a funnel takes one cheap query or a scan of billions of JSON rows, and whether two teams’ numbers agree.17 min
  10. Metrics and semantic layers: one definition eachA clean data model gives every row one meaning, but “revenue” and “average order value” are formulas over rows, and formulas get copied into every dashboard. Data engineers are the ones asked to make those formulas agree, in every tool, after every change.16 min
  11. Modeling data for machine learning featuresML teams train on the same orders and customers your reports use, but they need every value as it stood on a past date. A table laid out for dashboards quietly hands a model the future, and the model looks good until it meets real customers.17 min
  12. Design: a data model for an online storeEach modeling technique is easy to get right on its own. Real models break where the techniques meet: a dimension that keeps history, joined by a load written before it did. Designing the whole model at once, with one key rule and checks between the tables, is what keeps a dozen tables telling one story.28 min

Practise with

No tools or paper guides for this module yet.

Terms this module teaches 45

Open glossary

Accumulating snapshot fact table

A fact table with one row per process instance, updated as the process reaches each step.