Skip to Content
The HIC Learning Exchange begins July 13, 2026. View the agenda
ReadingItem 7 of 22 · 10 min

Data Modeling Overview: The Medallion Architecture

In this sub-module, Group I stands up the medallion architecture on the warehouse and uses it to model two real datasets: DHIS2 aggregate indicators and Maternal Audit data. The transformation work is done with dbt for SQL models and Python for the pieces that need procedural logic — source profiling, ingestion helpers, and data quality checks that go beyond declarative tests.

By the end you will have a warehouse organised into three layers — Bronze, Silver, and Gold — with tested, documented dbt models flowing between them, ready to power the analytics and ML work later in the track.

The three layers

The medallion architecture organises the warehouse by level of refinement rather than by source system or team. Data only moves in one direction — each layer is rebuilt from the one below it.

LayerContentsGuarantee
BronzeRaw data exactly as ingested from DHIS2 and the Maternal Audit systemNothing is altered — an untouched, replayable copy of every source
SilverCleaned, typed, deduplicated, conformed modelsOne reliable row per entity, consistent names and types across sources
GoldDimensional models and aggregates built for consumersBusiness logic applied once; ready for BI, ML, and applications

How medallion maps onto landing, staging, and marts

If you have worked with a classic ELT project layout, the medallion layers are the same idea under different names, and the dbt project in this sub-module uses both vocabularies interchangeably:

  • Bronze is raw / landing. Ingestion extracts from DHIS2 and the audit database and loads as-is. No dbt models live here; it is the input to everything.
  • Silver is staging and intermediate. stg_* models cast, rename, and dedupe each source; int_* models join sources and apply shared business rules.
  • Gold is marts. dim_* and fct_* models expose facility dimensions and indicator facts that analysts query directly, with tests and documentation attached.

Because each layer is derived from the previous one, any model can be dropped and rebuilt from Bronze at any time — reproducibility is a property of the architecture, not a discipline you have to remember to apply.

What you will build

  1. Create the Bronze, Silver, and Gold schemas on the warehouse and wire up the dbt project that targets them.
  2. Land DHIS2 aggregate extracts and Maternal Audit tables into Bronze, then profile them with Python before modelling anything.
  3. Build the Silver staging and intermediate models, then the Gold marts, adding dbt tests and documentation as you go.

Before the lab, work through the Introduction to Data Modelling lecture — it covers why raw data lands first, what the transform step is for, and the five activities you will carry out in the lab. Then get dbt running with the dbt training guide and build the layers end to end in Lab 3: Medallion dbt Modeling — DHIS2 Case.