Skip to content
Partner Developer Portal

Definition

The Model Data Quality view surfaces the latest data quality status for each OpenSafely model by environment.

It is designed to give a quick, consumer-friendly signal of whether the most recent quality suite for a model passed or failed.

Each row represents the latest known quality run for a model in a given environment.

  • model_name is normalised to remove the internal srv_ prefix.
  • run_at is the latest run timestamp for that model/environment.
  • status is the latest outcome at that timestamp.
  • airflow_run_id links the record back to pipeline execution context.
  • Check whether a model’s latest quality run has passed before running an analysis.
  • Build operational dashboards that show quality status by model.
  • Correlate quality status with refresh windows from model_run.
SELECT
environment,
model_name,
status,
run_at,
airflow_run_id
FROM explorer_open_safely.model_data_quality
ORDER BY run_at DESC