Shopify

How to Track State with Type 2 Dimensional Models - Shopify

Aug 27, 2020
How to Track State with Type 2 Dimensional Models - Shopify
SummaryAI, from the source post

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.

More from the Data Store Selection and Usage trail