Skip to content
LakeBench
ProblemsCommunityPricing
Sign inStart practicing
Back
  1. Home
  2. Interview prep
  3. Transactional fact vs periodic snapshot

Data modeling · Advanced Modeling

Transactional fact vs periodic snapshot

Mediummodel-21
transactional factperiodic snapshotsemi-additivegrain

Question

What is the difference between a transactional fact and a periodic snapshot fact?

Solution

Transactional fact

Records discrete events as they happen. New events → new rows. Ideal for "what happened?"

Grain examples: one row per payment, one row per order line, one row per click.

Periodic snapshot fact

Records the state of something at regular intervals (end of day, end of month). Ideal for "what was the position?"

Grain examples: one row per account per day (balance), one row per SKU per warehouse per day (on_hand).

Transactional sales:
  day1: +3 orders, day2: +5 orders  → 8 event rows across two days

Inventory snapshot:
  day1: SKU-A on_hand=40
  day2: SKU-A on_hand=37
  → two rows; you do NOT sum on_hand across days for "total inventory"

Additivity

Transactional amounts are usually fully additive. Snapshot balances are often semi-additive: sum across products/stores, not across time.

Interview tip

Pick from the question: events → transactional; balances / on-hand / headcount over time → periodic snapshot.

PreviousNext