Step Dimension
A Step Dimension in data warehousing represents a process that involves several steps or stages, each of which might need to be analyzed separately. This type of dimension is beneficial in scenarios where a process progresses through distinct phases, and you want to track or analyze each phase individually.
Step Dimension: OrderStatusDimension
This dimension table represents the different steps in the order processing lifecycle.
1
Order Placed
Order has been placed
2
Payment Processed
Payment has been received
3
Shipped
Order has been shipped
4
Delivered
Order has been delivered
Fact Table: OrderFact
The fact table tracks each order along with its current status.
SQL Query Example
To analyze the number of orders at each status:
Remember the Accumulating Snapshot Fact table?
Step dimensions are closely connected to the Accumulating Snapshot Fact table.
When an order is placed, a new record is inserted with the
OrderDate
and initialCurrentStatus
.As the order progresses through payment, shipping, and delivery, the respective date fields and the
CurrentStatus
are updated.This table allows for analysis of the duration between different stages of the order process, identification of bottlenecks, and overall process efficiency.
Last updated