Data Store Selection and Usage
How to Track State with Type 2 Dimensional Models - Shopify

How to Track State with Type 2 Dimensional Models - Shopify

8/27/2020

What this post added

This post introduces and details the implementation of Type 2 dimensional models for tracking historical state in data, specifically for use cases like tracking user language preferences over time. It contrasts Type 1 (current state) and Type 2 (historical state) models, outlines three options for implementing Type 2 models (modifying core application design, stitching database snapshots, and adding database event logging), and provides a detailed PySpark implementation recipe for building Type 2 dimensions from event logs. The post also discusses the use of dbt for data modeling and the challenges and trade-offs associated with each implementation option.

Read the original post ↗