A green checkmark on a pipeline only means the code didn't crash. It says nothing about whether the numbers are right. A few automated checks after each load catch most problems before they reach a dashboard.
1. Row counts
Compare today's row count with recent days. A drop to zero, or a sudden tenfold jump, almost always means something upstream changed.
2. Freshness
Check the newest timestamp in the table. If the latest order is from three days ago, the source has stopped sending data, even if the pipeline "succeeded".
3. Required fields
Columns that must always be filled (IDs, dates, amounts) should be checked for nulls. A few nulls might be acceptable; set a threshold rather than demanding perfection.
4. Uniqueness
Primary keys must be unique. Duplicates usually mean a join went wrong or a load ran twice.
SELECT order_id, COUNT(*) FROM orders GROUP BY order_id HAVING COUNT(*) > 1;
5. Valid values
Amounts should be positive, statuses should come from a known list, percentages should be between 0 and 100. These checks catch unit mix-ups, like cents loaded as shillings.
6. Reconciliation
Totals in the warehouse should match the source system: revenue for the day, number of active customers. This is the check business users trust most.
What to do when a check fails
Decide in advance. Critical failures should stop the pipeline and keep yesterday's data in place. Warnings can let data through but notify the team. Either way, a failed check should reach a person, not sit in a log nobody reads.

Comments (0)
No comments yet. Start the conversation.
Join the conversation
Sign in or create a free account to comment.