Medallion Monitoring: Data Observability Guide

Monitor Bronze, Silver, and Gold with freshness, volume, and schema checks. Use a PostgreSQL-style alert example, defined baselines, and owner routing.

Medallion Monitoring: Data Observability Guide

Image Source: unsplash

Medallion monitoring means watching five signals — freshness, row volume, schema drift, quality, and business reconciliations — across Bronze, Silver, and Gold. Treat the layers as logical zones, not three mandated copies: you can monitor the same physical table at several stages. Each signal needs a unit, an interval, and an owner you can page.

Key Takeaways

  • Monitor five signals per layer: freshness, row volume, schema drift, quality, and business reconciliation. Freshness and event age are different questions, so evaluate them separately.

  • Bronze, Silver, and Gold are logical zones, not a requirement to store three physical copies. What matters is where a check runs and who acts on it.

  • One table beats five aspirational ones: metric, unit, check interval, illustrative threshold, owner, and response belong in the same row.

  • Thresholds are always local. A fixed cutoff across every table will either page you at 3 a.m. or hide a real outage.

  • Late-data grace, alert deduplication, quarantine, and business SLOs turn detection into something a team can keep running.

What Medallion Monitoring Should Hold

Picture your team getting paged at 6 a.m. because yesterday's revenue report is short by 4,000 orders. Nobody knows if the feed was late, the table was empty, or a column silently changed type. That is the gap observability closes, and it closes it only when each layer has checks with names attached.

In Medallion Architecture the Bronze layer lands raw data, Silver cleans and conforms it, and Gold publishes trusted marts. Skipping checks here has a cost, and "poor data quality" is the usual way people say it: reports drift, reconciliation evidence goes missing, and analysts end up rebuilding trust in numbers by hand. For the wider rollout sequence, the Medallion implementation checklist hub covers schema, orchestration, and ownership steps that pair with the monitoring design below.

Bronze, Silver, and Gold Are Zones, Not Copies

The layers describe when a transformation happens, not how many times you must persist the data. A small team can run one physical table and monitor it at three promotion stages; a larger platform may keep full Bronze snapshots for audit and replay. Both are valid. What is not valid is assuming that because a layer exists, someone is watching it — or that a second copy makes monitoring unnecessary.

The practical consequence is that your observability design should key on table plus stage plus owner, not on layer names alone.

The One Monitoring Table Worth Maintaining

Every signal you track needs the same seven fields, or nobody knows what "broken" means. Build the table from your highest-impact tables first — typically three to five per layer — and leave the rest until the first four rows have survived a month.

The thresholds below are illustrative starting points for a daily retail orders pipeline, not universal defaults. They show the shape of a defensible row, including how you would react and where the check stops being useful.

Layer / Table

Metric

Unit

Check Interval

Illustrative Threshold

Owner

Response

Limits of the Check

Bronze / raw_orders

Ingestion visibility (latest loaded row vs. now)

Minutes

Every 15 min

> 90 min since any row landed

Data Engineering

Page on-call; check source extractor logs and event-stream consumer lag

Proves data arrived, not that it is complete or on time

Bronze / raw_orders

Event age (now minus newest event_ts, observed)

Hours

Hourly

> 12 h old as observed

Data Engineering

Split the gap into source-side delay vs. ingestion delay using per-row event_ts and ingested_at

Measures observation age, not per-row delivery lag

Silver / orders_clean

Row volume vs. same window last week

Ratio

Daily

< 0.7× or > 1.3× baseline

Data Engineering

Inspect the Bronze-to-Silver promotion job and any filter changes

A real traffic shift looks identical to a pipe break

Silver / orders_clean

Schema drift (column count vs. contract)

Columns

Daily

present < expected

Analytics Engineering

Compare contract against upstream schema; pause promotion

Count only: cannot see a rename, reordering, or a silent type change

Silver / orders_clean

Duplicate order_id rate

Percent

Daily

> 0.1% of rows

Analytics Engineering

Re-run the dedup step; check for a double-load

Merely suppressing duplicates hides a source-side replay

Gold / fct_daily_sales

Reconciliation to finance ledger (order total)

Absolute currency

Daily

> 0.5% or > 200 units of difference

Data Analytics

Reconcile at order granularity before publishing to the board

Tells you something is off, not which layer caused it

Gold / fct_daily_sales

Metric freshness vs. business SLO

Minutes

Every 15 min

> 60 min past the 07:00 UTC publish target

Data Analytics

Notify stakeholders with an ETA; hold the report

Measures publish time, not data correctness

Two rows here deserve emphasis because teams routinely merge them. Ingestion visibility asks "did anything land at all?" Event age asks "how old is the newest event now that I'm looking?" A busy table can pass the first while failing the second, and that is the exact state that produces a half-empty dashboard nobody questions.

Promotions and Quality Gates

A check is only useful if it blocks something. Promotion gates attach each Silver and Gold check to the movement it guards, so a failure stops the downstream step instead of paging someone after a bad number has already shipped. The design of those gates — contracts, blocking vs. warning, and replay rules — is covered in this guide to lakehouse data quality checks and promotion gates.

Writing the Alert Query

Diagrams are fine for a design review; SQL is what runs at 3 a.m. The query below reads three named fixtures: mon_registry_orders (which tables are expected), mon_snapshot_orders (what a run observed), and mon_baseline_orders (what normal looks like). It is illustrative and has not been executed against a live system — treat it as a shape to adapt, not a certified implementation.

All three are documented here, because a monitoring query is only as honest as its inputs:

-- Fixture: mon_registry_orders (expected tables; edit when scope changes)
  --   layer       text   -- 'bronze' | 'silver' | 'gold'
  --   table_name  text
  --   PRIMARY KEY (layer, table_name)
  
  -- Fixture: mon_snapshot_orders (one row per observed table per run)
  --   snapshot_id      bigint       -- run identifier
  --   layer            text
  --   table_name       text
  --   run_status       text         -- 'complete' | 'partial'
  --   row_count        bigint       -- rows in the covered window
  --   max_ingested_at  timestamptz  -- UTC; newest row WRITE time
  --   max_event_ts     timestamptz  -- UTC; newest row EVENT time
  --   expected_columns int          -- column count in the active contract
  --   present_columns  int          -- column count actually found
  --   taken_at         timestamptz  -- UTC; when the snapshot was taken
  --   PRIMARY KEY (snapshot_id, layer, table_name)
  
  -- Fixture: mon_baseline_orders (expected volume per day type)
  --   layer            text       -- 'bronze' | 'silver' | 'gold'
  --   table_name       text
  --   weekday          smallint   -- ISO 1=Mon .. 7=Sun
  --   window_start_utc time       -- UTC start of the covered window, e.g. 00:00
  --   window_minutes   int        -- window length; must match what was observed
  --   baseline_rows    bigint     -- median rows for that window and day type
  --   covered_weeks    smallint   -- weeks of comparable history behind it
  --   refresh_date     date       -- UTC date the baseline was recomputed
  --   PRIMARY KEY (layer, table_name, weekday)  -- exactly one baseline per cell
  

A baseline row only joins when it matches the observed window start and length as well as the weekday; covered_weeks and refresh_date are there so you can check the baseline still reflects the right seasonal and time-of-day mix. The unique key matters for the same reason: two competing baselines for one weekday make the volume band ambiguous and quietly double-count rows.

Run selection is an input, not something the query should guess. Pass in the latest completed run ID, or the query may evaluate a half-written snapshot and report tables as missing when they simply hadn't been written yet. Exposing it as a parameter beats burying a MAX(snapshot_id) inside the SQL:

-- Illustrative PostgreSQL-style alert query (unexecuted).
  -- Parameter: :run_id — latest COMPLETE run id, supplied by the scheduler.
  -- All timestamps are timestamptz in UTC.
  SELECT
      r.layer,
      r.table_name,
      CASE
          WHEN s.table_name IS NULL THEN 'MISSING_TABLE'   -- registered, absent from run
          WHEN s.run_status IS DISTINCT FROM 'complete' THEN 'PARTIAL_RUN'
          WHEN s.taken_at IS NULL THEN 'MISSING_SNAPSHOT_TIME'
          WHEN s.max_ingested_at IS NULL THEN 'NO_DATA'    -- zero-row window
          WHEN s.taken_at < s.max_ingested_at
            OR s.taken_at < s.max_event_ts THEN 'CLOCK_OR_TIMESTAMP_ERROR'
          WHEN s.taken_at - s.max_ingested_at > INTERVAL '90 minutes'
              THEN 'STALE_INGESTION'
          WHEN s.max_event_ts IS NULL THEN 'NO_EVENT_TIME'
          WHEN s.taken_at - s.max_event_ts > INTERVAL '12 hours'
              THEN 'LATE_EVENTS'
          WHEN s.row_count = 0 THEN 'ZERO_ROWS'
          WHEN b.baseline_rows IS NULL
            OR b.window_minutes IS NULL
            OR b.window_minutes <> 720
            OR b.baseline_rows <= 0 THEN 'MISSING_BASELINE'
          WHEN s.row_count < 0.7 * b.baseline_rows THEN 'LOW_VOLUME'
          WHEN s.row_count > 1.3 * b.baseline_rows THEN 'HIGH_VOLUME'
          WHEN s.present_columns IS NULL OR s.expected_columns IS NULL
            OR s.present_columns <> s.expected_columns THEN 'COLUMN_COUNT_DRIFT'
          ELSE 'OK'
      END AS verdict,
      s.row_count,
      b.baseline_rows,
      s.taken_at - s.max_ingested_at AS ingestion_age,
      s.taken_at - s.max_event_ts    AS event_age   -- observation age, NOT delivery lag
  FROM mon_registry_orders AS r
  LEFT JOIN mon_snapshot_orders AS s
      ON  s.layer       = r.layer
     AND  s.table_name  = r.table_name
     AND  s.snapshot_id = :run_id
  LEFT JOIN mon_baseline_orders AS b
      ON  b.layer       = r.layer
     AND  b.table_name  = r.table_name
     AND  b.weekday     = EXTRACT(ISODOW FROM s.taken_at AT TIME ZONE 'UTC')
     AND  b.window_start_utc = TIME '18:00'
  ORDER BY r.layer, r.table_name;

Fixture assumption: each observed volume covers the complete 12-hour UTC window from 18:00 on the preceding day to 06:00 on the check date. Baseline weekday identifies that window’s ending day. The scheduler supplies a completed run ID; verify window coverage and baseline uniqueness before running. Per-row event arrival delay requires event and ingestion timestamps from the same record.Four details make or break this query. First, max_ingested_at IS NULL is tested before any arithmetic — in a zero-row table every max is NULL, and NULL > INTERVAL returns NULL rather than true, so a naive comparison reports nothing instead of a failure. Second, MISSING_BASELINE is checked explicitly instead of being left to fall through: a NULL baseline makes both volume comparisons NULL, and the CASE would land on OK for a table nobody is actually measuring. Third, a negative age is a bug, not a stale feed — if taken_at precedes max_ingested_at, either the snapshot clock or the source timestamp is wrong, and calling that STALE_INGESTION sends you into the wrong system. Fourth, the LEFT JOIN starts from the registry, which is the only way the query can notice a table that never appeared in the run at all.

The two age columns measure different things, and renaming them matters. ingestion_age is how long the newest write has been sitting there. event_age is how old the newest event is as observed now, so it bundles everything between generation and inspection. Don't relabel it as ingestion delay. And resist the tempting max_ingested_at - max_event_ts: each max can come from a different row, so that subtraction is at best a rough maximum across mixed rows, never row-level lateness. For true delivery lag, store per-row event_ts and ingested_at together and look at that distribution.

expected_columns versus present_columns is a count-only signal. A rename swaps one column for another, and a type change leaves the count untouched, so neither shows up here. Catching those needs a real schema signature — column names, order, and data types compared against the contract.

Where This Query Stops

One CASE returns one verdict per row, which is convenient and incomplete. A table with both late events and a schema drift reports the first matching branch, so the second problem waits until the first is fixed. Teams that need parallel alerts generally run one query or rule per check and let each raise its own alert.

The snapshot-only view also has a blind spot that the registry closes only partly. If a table is missing from the snapshot and from the registry, nothing compares it against anything, and the run looks clean. Keep the registry under review whenever scope changes; a monitor that silently stops watching is worse than one that never started.

Neither fixture mentions time-of-day coverage beyond the weekday key. If your traffic differs sharply by hour, add an hour bucket to the baseline key and match it the same way, or the volume band will keep firing on the quiet hours.

What the Fixture Returns

Assume a registry of seven expected tables and run snapshot_id = 42, all timestamps in UTC and every run_status set to complete. The seven snapshot rows are:

table_name

max_ingested_at

max_event_ts

row_count

baseline / window

expected / present cols

raw_orders

2026-11-27 05:15

2026-11-27 05:14

12,480

12,000 / 720

14 / 14

raw_payments

NULL

NULL

0

9,000 / 720

11 / 11

orders_clean

2026-11-27 05:30

2026-11-27 04:10

8,650

12,500 / 720

18 / 17

fct_daily_sales

2026-11-27 03:00

2026-11-26 23:00

940

1,000 / 720

9 / 9

raw_clickstream

2026-11-27 05:58

2026-11-27 01:20

0

0 / 720

7 / 7

dim_customers

2026-11-27 05:40

2026-11-27 05:39

5,100

5,000 / 60

9 / 9

ops_events

2026-11-27 06:04

2026-11-27 05:59

1,200

1,150 / 720

6 / 6

With taken_at = 2026-11-27 06:00 for all seven rows, the checks resolve deterministically:

  • raw_orders: ingestion age = 06:00 − 05:15 = 45 min (limit 90, passes); event age = 46 min (passes); 12,480 sits between 0.7 × 12,000 = 8,400 and 1.3 × 12,000 = 15,600 → OK.

  • raw_payments: max_ingested_at is NULL → NO_DATA, and evaluation stops there.

  • orders_clean: event age = 06:00 − 04:10 = 1 h 50 min (passes); 8,650 ÷ 12,500 = 0.692, under the 8,750 floor → LOW_VOLUME. The 17-of-18 count would also have flagged, but only as COLUMN_COUNT_DRIFT.

  • fct_daily_sales: ingestion age = 180 min > 90 → STALE_INGESTION, even though 940 versus 1,000 looks healthy.

  • raw_clickstream: both timestamps present, row_count = 0 → ZERO_ROWS; the ingestion and event checks ahead of that branch are what keep an idle-but-alive feed from reading as missing.

  • dim_customers: age is positive, volume fine, but the baseline covers 60 minutes against a 720-minute observation → MISSING_BASELINE.

  • ops_events: taken_at 06:00 precedes max_ingested_at 06:04 → CLOCK_OR_TIMESTAMP_ERROR, not a stale feed.

That is seven rows for seven registered tables, because the registry drives the FROM clause. Now add an eighth entry, gold/customer_ltv, to the registry with no matching snapshot row at run 42. It returns a single row with the registered layer and table name, with NULL snapshot fields, which the first branch labels MISSING_TABLE — a whole table silently absent, caught only because the registry was the left side of the join. The mix is the point: a yes/no dashboard would flatten all of this into "red."

Alert Routing, Quarantine, and Service Levels

Detection is the easy half. What happens after the alert fires decides whether anyone still trusts the pager in three months.

Late-data grace. Not every late arrival is an incident. Publish a grace window per table — the interval between when data may still legitimately land and when you start alerting — and flag records that arrive inside it as late-but-accepted rather than failed. If a partner feed routinely delivers at 05:55 for a 06:00 cutoff, the grace window is five minutes, not zero. Late-arriving records that fall outside the grace window should revise the affected partitions and re-trigger reconciliations rather than quietly appending.

Deduplication and routing. Hourly freshness checks on forty tables generate a lot of noise. Group alerts by root cause — one failing upstream extractor should produce one incident, not twelve — and route by owner and severity. Ingestion failures go to the platform on-call channel; reconciliation gaps go to the analytics channel with a link to the reconciliation query. Suppress repeats while an incident is open, and only escalate when the window you commit to is breached.

Quarantine. Instead of failing an entire batch on a handful of bad rows, route them to a quarantine table with the failing rule, the offending payload, and a timestamp. Promotion continues on the clean remainder, and the quarantine count becomes its own monitorable metric — if it spikes, you have a quality regression, not a one-off. Cap quarantine volume; when it exceeds a share of the batch, fail the promotion.

Business SLOs. Technical freshness and business freshness are not the same commitment. A table can be technically fresh and still miss a board-pack deadline. Define SLOs in the language of the consumer — "yesterday's sales available by 07:00 UTC," "weekly reconciliation within 0.5% of the ledger" — and report error budgets against them. These are internal targets you set and measure; they are not audit certifications or external guarantees.

None of the numbers in this article should be read as expected performance. They are parameters to argue about with your own data, then put in a table with someone's name on it.

FAQ

Which metrics should a medallion monitoring dashboard show first?

Start with freshness and volume per layer, then add schema drift. Those three catch the majority of silent failures, and they are cheap to compute. Add quality and reconciliation metrics once the first three have survived a month without overwhelming the team.

Do Bronze, Silver, and Gold need separate physical copies to monitor?

No. The layers are logical stages, so you can monitor one physical table at several promotion points. Separate Bronze snapshots help if you need replay or audit, but they are a design choice, not a monitoring requirement.

Why evaluate ingestion visibility and event age separately?

They answer different questions. Ingestion visibility asks whether data landed at all; event age asks how old the newest event looks when you inspect it. A table can pass the first and fail the second, and merging them hides which pipeline stage broke.

How should volume checks handle weekends and seasonality?

Match the baseline on weekday, window start, and window length — not just a flat threshold. Add holiday exclusions and an hour bucket if traffic swings by time of day. A single minimum row count either pages you on quiet days or misses real drops.

See Also

Exploring The Fundamentals Of Cloud Data Design

Why Businesses Should Embrace AI Observability Solutions

Comparison of Apache Iceberg and Delta Lake table formats

Related Articles