{
  "id": 10456441,
  "title": "Your dashboard is green and the number is wrong: the SQL checks I schedule next to every metric",
  "url": "https://urgent.news/2026/09/28/your-dashboard-is-green-and-the-number-is-wrong-the-sql-checks-i",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-28T13:55:46.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/refaeldakar/your-dashboard-is-green-and-the-number-is-wrong-the-sql-checks-i-schedule-next-to-every-metric-2bka"
  },
  "original_language": "en",
  "account": "Broken dashboards often appear functional, but subtle issues can arise. Pipeline monitoring rarely detects these problems, as a job may run smoothly yet generate incorrect numbers. A set of simple SQL queries can serve as a reliable safeguard. Here's what to monitor:\n\n1. Freshness: Verify that data arrives within an acceptable timeframe. If not, the dashboard should alert you. Use a time window matching the actual load schedule, such as 3 hours for nightly batches.\n\n2. Volume comparison by weekday: Instead of checking the count against a fixed threshold, compare the current day's volume to the same weekday in the past few weeks. This helps account for weekend and holiday variations.\n\n3. Grain consistency: Ensure the data model remains consistent. If a single row should represent an order, but due to a schema change, it now represents an order line, the check will reveal the discrepancy before any summing occurs.\n\n4. Mapping table integrity: Watch for new plan, country, or campaign entries that don't match upstream. This can cause issues when breaking down data by category. Check the percentage of unmapped entries.\n\n5. Reconciliation with a second source: Cross-reference critical data, such as orders against payments or app signups against the CRM. Compare the same time period from multiple data sources to ensure consistency.\n\nEach check is designed to return rows only when an issue exists. Zero rows indicate everything is functioning correctly. This approach simplifies alerting, as a single row signifies a problem, providing both the affected day or key and a detailed alert message.",
  "summary": "Most broken dashboards don't look broken. The chart renders, the numbers are plausible, the pipeline says success. Then someone in finance asks why last month's revenue changed after the fact, and you find out a join has been double-counting refunds since a schema change three weeks ago. Pipeline monitoring doesn't catch this. The job ran fine. It just produced the wrong number. What does catch…",
  "key_points": [
    "Verify data freshness within acceptable timeframe, use matching load schedule window",
    "Compare current day's volume to same weekday in past weeks, account for variations",
    "Ensure data model consistency, reveal discrepancies before summing occurs"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}