Databricks Field Guide

Operating · Chapter 26

Databricks data observability: freshness, volume and quality

Reviewed by TechFabric engineers. How we write this guide →

Data observability means being able to tell, from signals the platform already records, whether the data people are reading is fresh, complete and correct, rather than only whether the jobs that wrote it succeeded. On Databricks those signals are the system tables (system.lakeflow for job and pipeline runs, system.query.history, system.access.audit, system.billing.usage), the pipeline event log, and data quality monitoring, whose anomaly detection flags stale and incomplete tables without any rules written by hand.

A pipeline that runs green for four days while its source sends nothing is the failure we'd design a monitoring setup around. Applications fail loudly. Data platforms fail quietly, producing a number that's wrong in a way nobody can see until a person makes a decision on it. This chapter is what we'd monitor, the queries and settings that do it as of October 2026, and how we'd run the incident when a number turns out to be wrong.

The short version

The dangerous failure on a data platform is not the one that pages someone at three in the morning. It is the one where everything reports success and the numbers are wrong, because a source system quietly changed the meaning of a field, or a file never arrived, or a job that was supposed to run simply did not start and therefore never failed. Monitoring that only watches whether jobs succeeded will not see any of that. What catches it is watching the data itself: is it as fresh as people believe, did roughly the expected amount of it arrive, and do the values still look like they looked last week. That shift, from watching the machinery to watching the output, is most of what separates a platform people trust from one they quietly work around.

The four things worth monitoring #

Everything we'd alert on falls into one of four categories. The first is the one teams usually have; the other three are the ones that catch the quiet failures.

Job health, meaning did the run succeed, how long did it take, and did it consume what it usually consumes. Runtime and cost trends matter as much as success, since a job that has quietly doubled in duration over a month is telling you something before it starts failing.

Freshness, meaning is the data as current as consumers believe it is. This is the check that catches a job which never started, a failure mode that produces no failure notification at all. We'd define a freshness expectation per published table and alert on breach, because that single check covers both the crash and the silent non-start.

Quality, meaning are the pipeline expectations passing, is the quarantine table growing, are null rates and distributions where they were yesterday. Distribution monitoring is what catches an upstream system changing the meaning of a field, which is the failure mode that produces confidently wrong numbers rather than errors.

Volume, meaning did roughly the expected quantity of data arrive. A source delivering ten percent of its usual rows is a problem no schema validation will catch.

Databricks now does the second and fourth for you. Anomaly detection, part of data quality monitoring and in Public Preview in October 2026, is switched on per schema by someone with MANAGE on the schema or its catalog (up to 50 schemas at once from the catalog), learns each table's commit history, and marks a table stale when a commit is unusually late and incomplete when the last 24 hours brought fewer rows than its predicted range. It runs on serverless compute, billed under the DATA_QUALITY_MONITORING product, doesn't touch the jobs that write the tables, and writes its verdicts to system.data_quality_monitoring.table_results, kept for 13 months. We'd turn it on for every gold schema on day one and treat the explicit freshness expectations below as the contract for the tables a regulator or a customer reads, where "unusually late" by a learned model isn't a strong enough promise.

Job health is a query against the jobs system tables, which keep 365 days of runs. This is the one we'd schedule as a SQL alert, because it finds the job that's degrading before it fails:

-- Jobs whose median run this week is 50% slower than over the previous four weeks.
-- Grouped by workspace too: job ids are unique only within a workspace.
-- Duration comes from the hourly slices, not run_duration_seconds, which reads 0 for multi-task jobs.
WITH runs AS (
  SELECT workspace_id, job_id, run_id,
         MAX(period_end_time) AS ended,
         SUM(timestampdiff(SECOND, period_start_time, period_end_time)) AS run_seconds
  FROM system.lakeflow.job_run_timeline
  WHERE period_start_time >= current_timestamp() - INTERVAL 36 DAYS
  GROUP BY workspace_id, job_id, run_id
  HAVING MAX_BY(result_state, period_end_time) IS NOT NULL
)
SELECT workspace_id, job_id,
       percentile(run_seconds, 0.5) FILTER (WHERE ended >= current_timestamp() - INTERVAL 7 DAYS) AS median_this_week,
       percentile(run_seconds, 0.5) FILTER (WHERE ended <  current_timestamp() - INTERVAL 7 DAYS) AS median_before
FROM runs
GROUP BY workspace_id, job_id
HAVING median_this_week > 1.5 * median_before;

The trap we'd design around is the duration columns. Per the jobs system tables reference, run_duration_seconds and its siblings are populated only for single-task jobs created through the legacy Jobs API; every multi-task or non-legacy run logs 0, so an alert built on them compares zero with zero and never fires. A run longer than an hour spans several rows with the same run_id and carries its result only on the last one, which is why the query sums the slices per run first. When the slow part matters, system.lakeflow.job_task_run_timeline has the same hourly slices per task, keyed by task_key, and the same arithmetic finds which task grew. Pipelines have their own pair, system.lakeflow.pipelines and system.lakeflow.pipeline_update_timeline. The system schema was previously called system.workflow, which older queries still use.

Job crashed

Job health

Job never started

Freshness

Source sent partial file

Volume

Field meaning changed
upstream

Quality and drift

Job slowing over weeks

Alert with an owner
and a runbook

Which monitor catches which failure, and why job status alone misses most of them

Alert on consumer-facing symptoms #

The distinction that keeps an on-call rotation sustainable is between things needing someone now and things needing someone tomorrow.

A gold table feeding a regulatory report going stale is an incident. A bronze ingestion job failing its first retry is not, provided the retry succeeds and the downstream freshness expectation holds. Alerting on both at the same severity trains people to ignore the channel, and the cost of that training is paid on the day something real happens.

We'd route quality warnings, quarantine growth and non-blocking failures to a review queue somebody works through on a schedule, and reserve paging for a breach of something a consumer depends on.

Two mechanisms do the alerting. A job can carry health rules, so it warns when a run takes longer than it should or a stream falls behind, rather than only when it fails. The metrics are RUN_DURATION_SECONDS and the STREAMING_BACKLOG_* family (bytes, records, seconds, files; the backlog metrics are Public Preview), and the only operator is GREATER_THAN (job settings). In a bundle it's a few lines on the job:

resources/daily_load.job.ymlyaml
resources:
  jobs:
    daily_load:
      name: originations-daily-load
      health:
        rules:
          - metric: RUN_DURATION_SECONDS
            op: GREATER_THAN
            value: 3600
      email_notifications:
        on_failure: [data-oncall@example.com]
        on_duration_warning_threshold_exceeded: [data-oncall@example.com]

Everything else is a Databricks SQL alert: a saved query on a schedule with a condition and a notification destination, which is how the job-health query above and the freshness checks below reach a person. Legacy alerts still run alongside the current ones while teams move across, and the current ones drop the legacy UNKNOWN state.

Runbooks, and where they live #

Every alert links to a runbook, and a runbook that does not say what to check first is not a runbook. The minimum useful content is what this alert means, which consumers are affected, what to check in what order, what the safe corrective actions are, and when to escalate.

A wiki is where runbooks go to be ignored during an incident. We'd keep them in the repository next to the pipeline they describe, so they are versioned with the thing they document and reviewed when it changes, which follows from the practice in CI/CD and Environments.

Incident practice specific to data #

Two habits make data incidents shorter, and we'd write both into the on-call guide.

Establish the blast radius before fixing anything. The question is which downstream tables, dashboards, models, and external consumers touched the bad data and over what window, and Unity Catalog lineage answers it in minutes, whereas the instinct is to start correcting the source table immediately.

Communicate that a number was wrong even after it has been fixed. A dashboard that was wrong for six hours was used to make decisions during those six hours, and the people who made them need to know. Data incidents have this property that application incidents mostly do not, and skipping the communication is how a platform loses trust that takes a year to rebuild.

ConsumersPipelineLineageOn-callAlertConsumersPipelineLineageOn-callAlertFreshness breach on gold tableWhat reads this, and since whenDownstream tables anddashboardsProvisional notice, numbers suspectFix cause, reprocess forwardChain rebuiltConfirmed correct, window affected
The order that shortens a data incident

The signals already in the platform #

We'd check which of these an estate uses before buying a monitoring tool to replicate them. Each is a table or a setting that exists today.

Freshness per published table. For a table with an explicit promise, such as "refreshed by 06:00", we'd skip learned models and check the last commit directly. Delta table history records every write's time, operation and row counts, so this works on any Delta table with nothing configured in advance. Run as a small scheduled job, a raised error becomes a failure notification with the table named in it:

# Freshness check: fail the run when a published table is older than its promise
from delta.tables import DeltaTable
from pyspark.sql import functions as F

PROMISES = {"finance.gold.daily_revenue": 26, "finance.gold.ar_aging": 26}  # max hours
# Operation names as DESCRIBE HISTORY records them (docs: tables/history-schema); check one of your own tables' history
WRITES = ["WRITE", "MERGE", "UPDATE", "DELETE", "STREAMING UPDATE", "COPY INTO",
          "CREATE TABLE AS SELECT", "REPLACE TABLE AS SELECT", "CREATE OR REPLACE TABLE AS SELECT"]

stale = []
for table, max_hours in PROMISES.items():
    last = (
        DeltaTable.forName(spark, table).history(50)
        .filter(F.col("operation").isin(WRITES))   # OPTIMIZE and VACUUM are commits too
        .select("operation",
                ((F.unix_timestamp(F.current_timestamp()) - F.unix_timestamp("timestamp")) / 3600)
                .alias("age_hours"))
        .orderBy("age_hours")
        .first()
    )
    if last is None or last.age_hours > max_hours:
        age = "no write in the last 50 commits" if last is None else f"{last.age_hours:.1f}h"
        stale.append(f"{table}: {age} (promise {max_hours}h)")

if stale:
    raise RuntimeError("Stale published tables:\n" + "\n".join(stale))

Expectation results as a series. Every Lakeflow pipeline run writes expectation pass and fail counts to its event log. Trending them turns data quality from a pass-or-fail moment into a line you can watch move:

WITH progress AS (
  SELECT timestamp,
         explode(from_json(
           details:flow_progress:data_quality:expectations,
           'array<struct<name: string, dataset: string, passed_records: int, failed_records: int>>'
         )) AS e
  FROM event_log(:pipeline_id)   -- or the published event log table's name
  WHERE event_type = 'flow_progress'
)
SELECT date_trunc('DAY', timestamp) AS day,
       e.dataset, e.name,
       SUM(e.passed_records) AS passed,
       SUM(e.failed_records) AS failed
FROM progress
GROUP BY ALL
ORDER BY day DESC, failed DESC;

Distributions and drift. Data profiling, formerly Lakehouse Monitoring, profiles a table on a schedule as a snapshot, time series or inference profile. It writes a profile metrics table and a drift metrics table and generates a dashboard for each. That covers null and zero rates and the distribution shifts that catch an upstream field changing meaning, and the inference profile tracks model inputs and predictions, which is how a degrading model shows up before the business notices.

Cost and performance in the same query. Because billing and query history are both tables, "which team's queries got slower after the change, and what did that cost" is a join. Cost and Performance has the queries.

Model and agent requests. Unity Gateway inference tables log requests and responses from serving endpoints to a Unity Catalog table, with rows arriving within about an hour, and MLflow tracing records each step of an agent, with Databricks recommending trace storage in Unity Catalog tables for production. They're the only practical way to debug the workloads in Agents, where the failure is usually a bad answer rather than an error.

Audit and delivery outward. system.access.audit (Public Preview, 365 days) answers who changed or read what, and audit log delivery to your own storage keeps a copy on the same timeline as the rest of the estate during a cross-system investigation. Security has the queries.

Assembling the same picture on each platform

Capability Databricks AWS Azure GCP
Operational telemetry as queryable tables System tables, plain SQL CloudWatch Logs Insights plus CloudTrail in Athena Monitor plus Log Analytics with KQL Cloud Logging sinks into BigQuery
Data quality and drift monitoring Data quality monitoring: anomaly detection on freshness and completeness, data profiling for drift Glue Data Quality, per job Purview data quality, separate service Dataplex data quality
Freshness expectations on a table Anomaly detection marks stale tables; SQL alerts for explicit promises Freshness alerts built with EventBridge and Lambda Freshness alerts built with Data Factory and Monitor Freshness alerts built with Composer and Cloud Monitoring
Column-level lineage for blast radius Unity Catalog, automatic Glue lineage, partial Purview, scan-based Dataplex, partial
Cost and performance in the same query Yes, billing joins to query history Cost Explorer separate from logs Cost Management separate from Monitor Billing export separate from logs
Model and agent request tracing Unity Gateway inference tables and MLflow tracing SageMaker Model Monitor Azure ML monitoring Vertex AI model monitoring

Retrospectives that change something #

The retrospective question we'd ask is not why the pipeline broke, since the answer is usually a specific upstream event that will not recur in the same form. It is why nobody knew for four hours, and the answer to that is almost always a missing check of the freshness, volume, or distribution kind. Each incident should end with a specific monitor added, and if it cannot, the incident is likely to happen again in a different costume.