Urgent.News

What's breaking now, across thousands of outlets.

Tech

Your dashboard is green and the number is wrong: the SQL checks I schedule next to every metric

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…

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:

1. 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.

2. 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.

3. 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.

4. 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.

5. 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.

Each 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.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Woman Says Goodbye to Childhood Home After Data Center Battle

After a high-profile fight over data center infrastructure, Ansley Brown says goodbye to her childhood home.

  • Ansley Brown bids farewell to childhood home in Coweta County.
  • Home to be demolished for Ashley Park-Wansley 500-kilovolt line.
  • Opponents claim data center project misuses eminent domain.

Is regex enough? I tested span-01 on mixed-language text

Have you ever exported a script for text-to-speech and found, later, that a single English word had slipped into it? I have — and the synthesized voice mangled that spot badly enough that I had to…

  • Regex alone insufficient for mixed-language detection, flags brand names and acronyms as defects
  • respan.ai service provides decision models based on plain language descriptions
  • Instruction wording significantly impacts decision model's accuracy in mixed-language detection

More from Monday 28 September →