Skip to content

Slowly Changing Dimension

Getting Started

Slowly Changing Dimension (SCD)

Types

Type 1

Type 2

Before I can implement a type 2 slowly changing dimension, I first fill the target table with an initial data load. However, a couple of metadata fields are required in order to track changes:

Column Description
is_current Whether the record has the currently valid information for the specific product code.
valid_from The timestamp from which the record was/is current.
valid_to The timestamp until which the record was/is current.
is_deleted Whether the product code no longer exists in the source data.

Type 3

Type 4

Type 5

Read Mores