Netflix viewing events
Model one atomic viewing-events fact that answers watch-time-by-title and unique-viewers-by-device.
Concept
fact-table-grain
The primary modeling idea this problem reinforces.
Requirements
0
Business needs the model must satisfy.
A streaming analytics team needs watch time by title and unique viewers by device. A teammate proposes two facts: a watch-time fact and a unique-viewers fact. The title and device dimensions already exist.
One atomic event fact answers many questions; splitting into a fact per metric duplicates grain decisions and makes cross-metric questions inconsistent. Unique viewers come from distinct-counting a dimension key, not from a second fact.
Template
The model users start from in the full workspace.
Entities
0
Seeded tables visible in the public preview.
Dialect
postgresql
Generated SQL target for this starter model.
This preview is read-only. Open the workspace to edit and verify; saving needs a free account.
Open workspaceTry the question first.
The discussion has other people's approaches and solutions. Give it a real attempt before you read them.