Medallion layers: bronze, silver and gold#
A way to organise a data platform into three layers of increasing quality: bronze holds data as it arrived, silver holds it cleaned and conformed, and gold holds it shaped for specific uses.
Before reading
Why it matters#
Without layers, every report reads raw source data and repeats the same cleaning, often differently. Mistakes cannot be fixed without reloading from the source. Layers give each kind of work a fixed place, so cleaning happens once, raw data is kept for rebuilding, and consumers know which tables they can rely on.
How it works#
Bronze is the landing layer. Data is stored as close as possible to how the source delivered it, including duplicates, wrong values and every change event. The only changes are load metadata, such as the source system and the ingestion time, and any masking applied on the way in (see EtLT). Bronze is append-only: nothing is updated or deleted, except by retention rules and erasure requests. Only pipelines read it. Its purpose is to be the record of what arrived, so that every later layer can be rebuilt from it.
Silver is the cleaned layer. Each table describes one business entity, such as an order or a customer, with proper types, consistent names, duplicates removed and changes applied, so each row shows the current state, or a tracked history. Records from different sources describing the same thing are aligned here. Silver is where data becomes trustworthy, but it is still organised around entities, not around any one report. Data engineers and analysts read it to build gold tables.
Gold is the consumption layer. Tables are built for a use: facts and dimensions for analysis, aggregates for dashboards, features for models, tables published to other teams. Gold tables have owners, documented meaning and agreed stability, because people and applications depend on them directly.
flowchart LR
S1[Orders DB] --> B1
S2[Payments service] --> B2
subgraph Bronze[Bronze: as delivered]
B1[(raw_orders<br/>every change event)]
B2[(raw_payments)]
end
subgraph Silver[Silver: cleaned, conformed entities]
C1[(clean_orders)]
C2[(clean_payments)]
end
subgraph Gold[Gold: shaped for use]
G1[(fct_daily_sales)]
G2[(fct_payments)]
end
B1 --> C1
B2 --> C2
C1 --> G1
C2 --> G2
G1 --> R[Dashboards,<br/>apps, models]
G2 --> R
The names vary between companies: raw or landing for bronze; clean, conformed, core for silver; marts, curated, published for gold. Some platforms add a layer, for example an intermediate step inside silver. What matters is the rules of each layer, not the names or the number.
Data flows in one direction. Gold reads from silver, silver from bronze. Nothing reads back upstream. Consumers outside the owning team read gold, or silver tables explicitly published as stable.
Key terms#
- Bronze (raw) Data as delivered, append-only, kept for rebuilding.
- Silver (clean) Typed, deduplicated, conformed entities.
- Gold (curated) Tables shaped for a specific use, with owners and stable definitions.
- Rebuild Recreating a layer from the one below after a logic change or a bug.
- Conformed Using the same keys, names and codes across sources.
Example#
One order, across the layers.
| Layer | Table | What it holds for order o-1001 |
|---|---|---|
| Bronze | raw_orders | Three change events: created, updated with a discount, cancelled, each with source and ingestion time |
| Silver | clean_orders | One row: o-1001, status cancelled, amount 49.90 after a 10.00 discount, typed and with current values |
| Gold | fct_daily_sales | Not counted in revenue for 28 October, because it was cancelled |
If the rule for discounts turns out to be wrong, clean_orders and fct_daily_sales are rebuilt from raw_orders. The source system is not touched.
Pitfalls#
- Business rules in bronze. Apart from masking and load metadata, bronze must stay as delivered, or rebuilding repeats the old mistakes.
- Consumers reading silver or bronze directly. They then depend on tables that were never meant to be stable.
- Gold as a copy of silver. Gold should exist because a use needs a different shape, not to fill a layer.
- Skipping retention on bronze. Keeping every event forever is expensive and can conflict with privacy rules.
Learn more#
- Databricks, What is a medallion architecture
- Databricks documentation, medallion lakehouse architecture