需求
“Create a retail sales gold-layer star schema with dim_date, dim_product, dim_store, dim_customer, and fact_sales tables, the shown keys, attributes, and sales measures, with each fact linked to its date, product, store, and customer dimensions.”
接著試試Add a promotion dimension.Add return transactions.
這張圖裡有什麼
看懂背後的決策。
01
Use surrogate keys for each dimension to decouple from source systems.
02
Include a transaction_id in the fact table to link back to operational systems.
03
Define relationships with mandatory one-to-many cardinalities from fact to dimensions.
When building a dimensional model for retail sales reporting in a data warehouse or lakehouse environment.