Order fulfillment snapshot
Build an order-line workflow fact where fulfillment milestones accumulate on one row.
Concept
fact-table-grain
The primary modeling idea this problem reinforces.
Requirements
5
Business needs the model must satisfy.
A commerce operations team wants to measure how long each order line spends from ordered to shipped to delivered. Product and fulfillment-center teams both need the same lifecycle facts for bottleneck analysis.
Fulfillment is a pipeline. If each milestone is modeled as a disconnected event fact, operations can count events but cannot easily inspect one order line moving through the full workflow.
- Create a fulfillment fact where one row represents one order line moving through fulfillment.
- Keep the order-line id queryable on the fact.
- Add ordered, shipped, and delivered milestone timestamps.
- Add a duration measure such as fulfillment_days.
- Connect product and fulfillment-center context through explicit N:1 relationships.
Template
Order fulfillment starter workspace
The model users start from in the full workspace.
Entities
2
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.