Prompt
How do I monitor data freshness and failed syncs in a pipeline?
Latest observation
Oct 17, 2026
OpenAI APIWeb search: off
To monitor data freshness and failed syncs in a pipeline, you usually want a combination of pipeline-level monitoring, data-level checks, and alerting.
1) Track data freshness
Data freshness means: “How recent is the data in the destination?”
Common ways to measure it
- Max event timestamp in the latest loaded data
- Last successful sync time
- Lag between source time and warehouse time
- Age of the newest record
- Expected schedule vs actual arrival time
Example freshness metric
If your pipeline runs every hour, you might monitor:
freshness_lag = now() - max(updated_at)- Alert if
freshness_lag > 90 minutes
Good practices
- Use a dedicated freshness table/metric
- Record:
- pipeline name
- source
- last successful load time
- max source timestamp ingested
- row count loaded
- freshness lag
2) Detect failed syncs
Failed syncs should be monitored at both the job level and data level.
Job-level monitoring
Track:
- failed runs
- retry counts
- duration anomalies
- skipped runs
- partial loads
Data-level monitoring
A sync may “succeed” technically but still be broken. Check for:
- missing partitions/days
- sudden drop in row counts
- duplicate records
- schema drift
- late-arriving or missing data
3) Set up alerts
Send alerts when:
- a sync fails
- freshness exceeds threshold
- row count changes unexpectedly
- no data arrives by expected time
- retries are exhausted
Alert channels
- Slack
- PagerDuty / Opsgenie
- webhook to internal incident system
4) Log useful metadata
For each run, store:
- run ID
- start/end time
- status
- source system
- destination table
- row counts read/written
- error message
- retry attempts
- watermark/timestamp used
This makes debugging much easier.
5) Use dashboards
Build a dashboard showing:
- last sync time by pipeline
- freshness lag over time
- success/failure rate
- run duration
- number of records loaded
- delayed or missing partitions
6) Add automated health checks
Examples:
- compare yesterday’s row count to a 7-day average
- verify each required table has been updated within SLA
- ensure latest partition exists
- validate key columns are not null
- verify source-to-destination record counts roughly match
7) Practical implementation pattern
A common pattern is:
- Pipeline completes
- Write sync metadata to a control table
- Compute freshness metrics
- Run validation checks
- Trigger alerts if thresholds are violated
- Surface everything in a monitoring dashboard
8) Tools you can use
Depending on your stack:
- Airflow / Prefect / Dagster for orchestration and run monitoring
- dbt tests for data quality checks
- Great Expectations for validations
- Monte Carlo / Bigeye / Databand / Anomalo for observability
- Prometheus + Grafana for metrics/alerts
Simple rule of thumb
Monitor both:
- “Did the pipeline run successfully?”
- “Is the data actually fresh and correct?”
If you want, I can also give you:
- a sample SQL query to calculate freshness, or
- a reference architecture for monitoring sync failures end-to-end.