fact_order table for BI, joining order events with user and product dimensions.
Scope
- Use cases
- Create a star schema with a central fact table and conformed dimensions.
- Support BI tools and warehouse analytics.
- Non-use cases
- Real-time feature joins for serving (see S004).
- SCD management logic (see S008).
Common steps
Build context
- Confirm available dimensions:
dim_user_current,dim_product_current. - Identify order events:
OrderCompleted, optionallyOrderCancelled.
Implementation notes
- Consider surrogate keys for dimensions if required by downstream tools.
- Store both natural keys (e.g.,
user_id,product_id) and surrogate keys (e.g.,user_key) if present. - Partition by order date and cluster by high-cardinality keys if supported.
RESINK.AI recommendations
Example
Variations
- Handle cancellations by adjusting facts
Troubleshooting
Duplicate order_ids cause constraint issues
Duplicate order_ids cause constraint issues
Ensure idempotency in the producer or use deduplication on
order_id with ROW_NUMBER() and keep latest.Mismatch between product price and order value
Mismatch between product price and order value
Use the price from the order event as the source of truth; store current product price for context only.

