Apply a repeatable approach for building a staging model from raw source data.
The raw table raw.order_events changes shape by vendor release, so every analyst is carrying local cleanup SQL into downstream work. Choose grain, normalize fields, dedupe obvious source artifacts, and stop before you encode business policy. The common trap is sneaking business logic into staging because you are already looking at the messy source. Step 1 · Confirm the grain Decide that one row equals one source event, not one order. Keep the staging model faithful to the raw event grain. If you collapse to order grain too early, you hide source behavior needed later for debugging and reconciliation. Step 2…
Sign up free — one personalized lesson every day, matched to your role and goals.
Already have an account? Sign in