Bronze, silver, gold: three contracts
The medallion pattern is three layers, each with a contract. Bronze is raw verbatim. Silver is cleaned and typed. Gold is modeled for consumption. The trick is not remembering the names, it is respecting what each layer promises to its consumers.
The three contracts
Each layer has one job. Each downstream audience reads from exactly one layer.
Bronze is an exact copy of the source, stored in the warehouse. You never mutate bronze. If the source changes, you land a new bronze snapshot and keep the old one. Bronze is your insurance policy: if any downstream layer is wrong, you can always replay from here.
Silver is where you do the hard human work: rename columns, cast types, drop duplicates, handle nulls, standardize values. Silver is what every analyst agrees to trust. If silver is wrong, everyone downstream is wrong, so silver is where tests live.
Gold is the modeled layer. Fact tables record what happened. Dimension tables describe who, what, and when. Surrogate keys glue them together so upstream identifier changes never ripple into dashboards. Gold is what a BI tool, an API, or an AI feature reads without rewriting SQL.
Matching exercise: Match each audience to the layer they should read from
Loading practice…
Every gold table ends up repeating the same cleaning. One team renames severity_level, another renames Severity_Level. Two weeks later the dashboards disagree again because the cleaning logic quietly diverged. Silver exists so the cleaning logic lives in one place and every gold table shares it.
Quiz: Quiz
Loading practice…