Medallion Lakehouse Diagram

The medallion architecture organises a lakehouse into three layers of increasing quality: bronze (raw data as it arrived), silver (cleaned and conformed) and gold (business-level tables). This sample shows a retailer's lakehouse from source systems through ingestion and the three layers to dashboards, ML and APIs.

This is an architecture diagram, not UML. UML covers software structure and behaviour; layered data architecture views are one of the other standard notations used alongside it.


1. The Diagram

Medallion lakehouse: bronze, silver, goldSOURCESINGESTIONBRONZESILVERGOLDSERVINGPostgresCDC via DebeziumClickstreamKafka topicFiles / APIsCSV, JSON, SaaSIngestionAuto LoaderKafka connectorCOPY INTOincremental,exactly-onceraw, append-onlyfull history keptorders_rawclicks_rawfiles_rawcleaned, dedupedconformed, MERGEorderscustomerssessionsaggregatedbusiness-readyfct_revenuedim_customercustomer_ltvBI dashboardsSQL warehouseML featuresfeature storeReverse ETL / APICRM, appsGovernance: Unity Catalogaccess control, lineage, audit across every layerEach hop is a scheduled or streaming job (Lakeflow Declarative Pipelines, Airflow, dbt).Tables are Delta or Iceberg: ACID writes, time travel, schema enforcement.
  1. Sources. An OLTP database (change data capture), a click stream and files from partners or SaaS APIs.
  2. Ingestion. Incremental loaders (Auto Loader, a Kafka connector, COPY INTO) track what has already been loaded, so each record lands once.
  3. Bronze. One table per source, append-only, with metadata such as ingest time and source file. Nothing is thrown away, so you can always rebuild.
  4. Silver. Types are fixed, duplicates removed, records merged by key and history tracked where needed. This is where data becomes trustworthy.
  5. Gold. Facts, dimensions and aggregates shaped for one purpose: revenue reporting, customer lifetime value.
  6. Serving. BI tools, feature stores and reverse ETL read only gold (and sometimes silver). The dashed governance band shows that permissions and lineage apply to every layer.

2. How to Read It

Notationbronzerawsilverclean, conformedgoldaggregatedservingconsumerscross-cuttinggovernance, catalogbatch or streaming hop between layers; arrow colour = target layer

Read left to right: each step to the right adds quality and loses generality. Keep the layer colours the same in every diagram your team draws, and list real table names inside each layer so the picture doubles as a map of the catalog.

3. Variant: Quality Gate into Silver

Variant: quality gate between bronze and silverbronze.orders_raw48,210 new rowsExpectationsorder_id IS NOT NULLamount >= 0, valid currencysilver.ordersMERGE on order_idsilver.orders_quarantinerow + failed rule + _ingest_tspass 48,021fail 189fix upstream or rule, then reprocessAlert if fail rate > 1%;stop the pipeline if > 5%.

The main diagram hides the most important rule of silver: bad rows must not get in. Here each batch from bronze is checked against expectations. Passing rows are merged into silver.orders; failing rows go to a quarantine table together with the rule they broke. After the upstream bug or the rule is fixed, the quarantined rows are reprocessed. Thresholds turn quality into an operational signal: alert at 1% failures, stop at 5%.

4. Pros, Cons, and When to Use

Pros

Cons

When to use

When not to use

5. As Diagrams-as-Code

Mermaid flowchart LR with one subgraph per layer:

flowchart LR
  pg[(Postgres CDC)] --> ing[Ingestion: Auto Loader / Kafka]
  ks[(Clickstream Kafka)] --> ing
  files[(Files / APIs)] --> ing
  subgraph bronze[Bronze: raw]
    orders_raw; clicks_raw; files_raw
  end
  subgraph silver[Silver: cleaned]
    orders; customers; sessions
  end
  subgraph gold[Gold: business]
    fct_revenue; dim_customer; customer_ltv
  end
  ing --> bronze --> silver --> gold
  gold --> bi[BI dashboards]
  gold --> ml[ML features]
  gold --> api[Reverse ETL / API]