learning-it by example

Back to the video

Conformed Dimensions and the Bus Matrix in SQL

Joining two fact tables made 25 pounds of refunds look like 50, and drilling across fixed it.

Video #259 ยท Data modelling

Steps in the video

  1. 0:00 Joined fact to fact: refunds 50, not 25
  2. 0:32 The idea
  3. 1:05 Setup
  4. 1:28 Three processes, one set of customers
  5. 1:57 The schema
  6. 2:30 Conformed, or not
  7. 3:01 The matrix and the drill across
  8. 3:29 Run the matrix
  9. 5:10 What this does not show
  10. 5:40 Mistakes to avoid
  11. 6:09 My take and next steps
  12. 6:34 Recap

Files

  • bus.py (73 lines)
  • run.py (65 lines)
  • source.py (18 lines)

Download the code (zip)

Tested with

Python 3.12.15

What this does not show

Three made-up processes in SQLite; it shows drilling across and two failures, not shrunken rollup dimensions or speed.

Sources

Learning IT by Example.