Subscription history at the right grain
Morrow Learning sells subscriptions that can change plan or pause. Finance needs month-end recurring revenue, while Product needs each lesson event attributed to the plan in force when it happened. Design a warehouse model that can answer both after late corrections.
Rubric and preparationWhat a mid answer covers · 2 lessons to prepare
Mid standard
- Connect the assumptions, method and result: I separate subscription identity, plan versions and effective-dated subscription states because a current snapshot cannot explain an earlier event. A lesson event is a separate fact at event grain and revenue snapshots need a stated month-end rule.
- Test the consequential edge case: I check one version per subscription at each instant, valid plan references and agreement with source billing states because totals alone can hide overlapping history. I test pauses, same-time changes and missing subscription references before building month-end snapshots.
- Explain an owned validation or operating check: I rebuild the affected interval and downstream partitions under a versioned rule, reconcile against billing and publish atomically because mixing old facts with new history can change attribution inconsistently. I retain the correction trail and report which periods were restated.