I'll never forget the Monday morning when our VP of Sales stormed into the engineering area, demanding to know why the weekend revenue numbers showed a 90% drop. Spoiler alert: revenue hadn't dropped. A seemingly innocuous schema change in our payment processor's API had broken our ingestion pipeline, and we'd been loading nulls for two days straight.
That incident cost us about 40 engineering hours, damaged our credibility with the business, and taught me an expensive lesson: if you're not monitoring data quality in production, you're flying blind.
Why Data Quality Monitoring Matters (More Than You Think)
Here's the uncomfortable truth: your data pipelines will break. Upstream APIs will change. Source systems will start sending malformed data. That JOIN you've relied on for months will suddenly produce duplicates because someone added non-unique keys to a reference table.
The question isn't whether these issues will happen—it's whether you'll detect them before they cause damage.
Data quality problems have a cascading effect. A data analyst builds a dashboard on bad data. The executive team makes strategic decisions based on that dashboard. By the time someone notices the numbers "seem off," you're weeks downstream from the actual problem, and the archaeological dig to find the root cause begins.
For business stakeholders reading this: imagine making Q4 planning decisions based on customer churn metrics that were actually calculating retention inversely. For data engineers: imagine explaining to your CEO why nobody noticed for six weeks.
The Four Pillars of Production Data Quality Monitoring
After building data quality systems at several organizations, I've come to believe that effective monitoring rests on four foundational pillars. Miss any of these, and you've got gaps in your safety net.
1. Freshness Monitoring
The most basic question: is the data even arriving?
Freshness checks monitor whether data is landing within expected time windows. Your daily customer export should arrive by 6 AM. Your streaming events should never lag more than 5 minutes behind real-time. When these SLAs break, you need to know immediately.
Implementation is straightforward:
SELECT
MAX(event_timestamp) as last_event,
CURRENT_TIMESTAMP - MAX(event_timestamp) as lag
FROM events.user_activity
WHERE partition_date = CURRENT_DATE;
-- Alert if lag > 10 minutesThis catches the most catastrophic failures: pipelines that have completely stopped running. Yet I'm constantly surprised by how many organizations don't have these basic checks in place.
2. Volume Anomaly Detection
Data might be arriving on time but in completely wrong quantities. Volume monitoring detects statistical anomalies in record counts.
Your e-commerce transactions table typically receives 10,000-12,000 rows per hour during business hours. Suddenly you're seeing 147 rows. Something is very wrong—maybe the payment gateway is down, maybe there's a filtering bug in your pipeline, maybe it's a legitimate Black Friday surge.
The key is establishing baselines and detecting deviations:
WITH daily_volumes AS (
SELECT
DATE(created_at) as date,
COUNT(*) as record_count
FROM production.transactions
WHERE created_at >= CURRENT_DATE - INTERVAL '30 days'
GROUP BY 1
),
stats AS (
SELECT
AVG(record_count) as mean,
STDDEV(record_count) as stddev
FROM daily_volumes
)
SELECT
t.date,
t.record_count,
s.mean,
(t.record_count - s.mean) / s.stddev as z_score
FROM daily_volumes t
CROSS JOIN stats s
WHERE t.date = CURRENT_DATE
AND ABS((t.record_count - s.mean) / s.stddev) > 3;A Z-score beyond 3 standard deviations warrants investigation. For business stakeholders: this is essentially asking "is today's data volume so different from the past month that it's statistically suspicious?"
3. Schema Validation
Schema changes are silent killers. A new nullable column becomes required. A VARCHAR(50) field starts receiving 100-character strings that get truncated. An integer ID switches to UUID format.
Modern data quality frameworks should validate:
- Expected columns are present
- Data types match specifications
- Nullable/not-null constraints hold
- Column value formats follow patterns (emails look like emails, phone numbers like phone numbers)
Here's where tools like Great Expectations, Soda, or dbt tests shine. You define expectations as code:
expect_column_values_to_not_be_null(
column="customer_id"
)
expect_column_values_to_match_regex(
column="email",
regex=r"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$"
)
expect_column_values_to_be_in_set(
column="order_status",
value_set=["pending", "processing", "shipped", "delivered", "cancelled"]
)These expectations run as part of your pipeline, failing the job if violations exceed thresholds.
4. Business Logic Validation
This is where monitoring gets truly valuable. Beyond technical checks, you need to validate business rules and logical consistency.
Examples from real-world scenarios:
- Revenue should never be negative (or if it can be due to refunds, it shouldn't be negative more than 5% of the time)
- Customer lifetime value calculations should fall within reasonable ranges
- Order totals should equal sum of line items plus tax and shipping
- User signup dates should never be in the future
- Churn rate shouldn't swing more than 10% week-over-week without explanation
These checks encode domain knowledge. They catch subtle bugs that technical validation misses—like when your currency conversion logic silently starts using stale exchange rates.
Building a Practical Monitoring Architecture
Theory is great, but how do you actually implement this? Here's the architecture I recommend for most mid-size data teams:
Layer 1: Pipeline-Integrated Checks
Build validation directly into your ETL/ELT jobs using frameworks like dbt tests or Great Expectations. These should fail the pipeline when critical issues are detected. Don't load bad data into production tables—catch it in staging.
Layer 2: Post-Load Monitoring
Some checks need to run after data lands, comparing new data against historical patterns. Schedule these to run 15-30 minutes after expected load times. Tools like Monte Carlo, Datafold, or custom SQL queries work here.
Layer 3: Business Metric Monitoring
Monitor the actual metrics stakeholders care about. This often lives in your BI tool (Looker, Tableau, etc.) or a dedicated data observability platform. Alert when KPIs show suspicious movements.
Layer 4: Manual Audits
Yes, manual. Some quality issues only become apparent through human review. Schedule regular data audits where analysts spot-check reports and investigate anything that "feels wrong."
Alert Fatigue is Real: Be Opinionated About What Matters
Here's where I get opinionated: bad alerting is worse than no alerting.
I've seen teams implement dozens of quality checks, generating hundreds of alerts weekly. Engineers start ignoring them. The signal drowns in noise. Then a critical issue gets missed because everyone has alert fatigue.
My rules for alerting:
- Severity matters: Critical alerts should wake people up. Warnings should route to Slack. Info-level findings should go to a daily digest.
- Alert on impact, not just anomalies: Not every anomaly affects downstream consumers. Alert when business-critical tables or widely-used datasets have issues.
- Include context: Your alert should answer "what's broken, how broken is it, and what's likely affected?" Don't make engineers play detective.
- Make alerts actionable: Every alert should link to a runbook with investigation steps.
- Tune aggressively: Review alert patterns monthly. Disable noisy checks that don't provide value.
Getting Started: A Phased Approach
Don't try to monitor everything at once. Here's a practical rollout plan:
Week 1-2: Inventory and Prioritize
List your most critical data assets. Which tables feed executive dashboards? Which feed customer-facing features? Which feed automated decisions? Start there.
Week 3-4: Implement Freshness and Volume Checks
These give you the most bang for buck. Simple SQL queries can catch 70% of common issues.
Week 5-8: Add Schema Validation
Implement basic schema checks on your critical tables. Start with not-null constraints and data type validation.
Week 9-12: Layer in Business Logic
Work with business stakeholders to identify the business rules that must hold true. Encode these as assertions.
Ongoing: Iterate Based on Incidents
Every data quality incident is a learning opportunity. After resolving an issue, ask: "How could monitoring have caught this earlier?" Then build that check.
The Cultural Shift: Data Quality is Everyone's Job
Technology alone won't solve data quality problems. You need a culture where everyone—engineers, analysts, business users—feels ownership over data quality.
At DataBolt, we've found success with these practices:
- Data SLAs defined and published for critical datasets
- Clear ownership: every important table has a designated owner
- Blameless postmortems when quality issues occur
- Quality metrics in team dashboards (not hidden away)
- Recognition for teams that maintain high quality standards
When a marketing analyst spots suspicious numbers and reports them before they propagate, that should be celebrated as much as an engineer who builds a clever new pipeline.
Conclusion: Trust is Earned Through Vigilance
Data teams earn trust slowly and lose it quickly. Every time stakeholders discover a data quality issue before you do, that trust erodes. Every time you catch and fix issues proactively, that trust grows.
Production data quality monitoring isn't glamorous work. It won't earn you conference talks or viral blog posts. But it's the foundation of reliable data infrastructure. It's the difference between a data team that's constantly firefighting and one that proactively maintains excellence.
Start small. Monitor your most critical datasets first. Build alerting that actually gets attention. Iterate based on real incidents. And remember: the best data quality issue is the one your stakeholders never hear about because you caught it first.
Your future self—and your VP of Sales—will thank you.