When a pipeline crashes the failure is at least visible, because the job turns red and someone is paged, so everyone knows the data will be late.
The failures that cost the most look different. The job finishes on time and reports success, even though it loaded a file half the usual size, a column that has gone empty, or yesterday's rows a second time, and no alert fires. Decisions get made on dashboards and forecasts built from those numbers, and when an analyst notices days later that a total looks odd, the investigation has to start from the report and work backwards through every layer.
A silent failure is a run that completes without error while producing wrong or incomplete data, or stale data. We think pipelines should be designed to turn such failures into visible ones, because data that is visibly late does far less harm than data that is wrong without anyone knowing, and most of this piece is about paying the cost of that choice sensibly.
In brief
- The most damaging pipeline failures are silent ones, in which a job succeeds while loading data that is wrong or partial or out of date.
- Orchestrator status shows whether the code ran but not whether the data is right, so pipelines need explicit checks on the data itself.
- Checks belong at boundaries, where data enters, after each major transformation and before anything is published to consumers.
- The write-audit-publish pattern keeps bad data away from consumers by loading it to a staging area and testing it there before promoting only what passes.
- Blocking checks should be kept for conditions that are certainly wrong, and an alert without a named owner and a written response tends to be ignored.
How pipelines fail without an error
Most silent failures come from a short list of ordinary causes.
Empty or truncated input files. The source export was cut short or produced a file with headers but no rows, and most loading tools do not treat zero rows as an error.
Schema drift in a source. A source team renames a column or changes its type, and a tolerant loader either fills the missing column with nulls or coerces text into numbers, turning each failed conversion into an unreported null.
Duplicates created by retries. A job that failed halfway through is run again and appends the same rows a second time, so that day's totals double.
Fan-out in a join. A dimension table that should hold one row per key acquires a second row for some keys, and every fact row that joins to those keys is then counted twice.
Stale data from upstream jobs. An upstream job did not run, but the downstream job ran on schedule against yesterday's table and reported success.
Errors that are swallowed. Someone wrapped a step in a handler that logs the exception and carries on so that one bad record would not stop the load, and now the load continues however many records are bad.
In each case the code worked as written. The orchestrator, whether Apache Airflow, Dagster, Prefect or a cloud scheduler, reports that the tasks ran but cannot judge whether the rows are right.
Check the data, at the boundaries
A data check is an assertion about a dataset that is evaluated on every run. Checks are most useful where data crosses a boundary, which means on arrival from a source and after each significant transformation, as well as before publication to the tables people and systems read.
Six kinds of check cover most of these failures.
| Check | Catches | Example |
|---|---|---|
| Volume | Empty, truncated or duplicated loads | Row count is within an expected range of recent days |
| Freshness | Stale upstream data | Latest event timestamp is within the last six hours |
| Schema | Renamed, dropped or retyped columns | Columns and types match the expected definition |
| Completeness | Columns that have gone empty | Share of null values in a required column stays below a limit |
| Uniqueness | Retries and join fan-out | The primary key has no duplicates |
| Reconciliation | Lost or altered records | Count and sum of amounts match a control total from the source |
Widely used tools include dbt's built-in tests, Great Expectations and Soda, while any warehouse can run plain SQL assertions, so the tool matters much less than the habit. A check can be as small as a query that must return no rows:
-- Fail the run if today's staged load looks wrong.
SELECT 'row count out of range' AS problem
FROM (SELECT COUNT(*) AS n FROM staging.sales_lines WHERE load_date = CURRENT_DATE) t
WHERE n < 40000 OR n > 120000
UNION ALL
SELECT 'duplicate line ids'
FROM (SELECT COUNT(*) AS n, COUNT(DISTINCT line_id) AS d
FROM staging.sales_lines WHERE load_date = CURRENT_DATE) t
WHERE n > d
UNION ALL
SELECT 'store ids missing'
FROM (SELECT COUNT(*) AS n FROM staging.sales_lines
WHERE load_date = CURRENT_DATE AND store_id IS NULL) t
WHERE n > 0;
The first check uses fixed bounds for clarity, although in practice the range is better derived from recent history for the same weekday so that an ordinary quiet Sunday does not trip it.
Reconciliation matters because it catches what the other checks miss. If the source can supply a control total, such as the day's transaction count and summed value, compare it with what landed.
The upstream half of this is an agreement with the source about what it will send, set out in data contracts: keeping an AI system's inputs from moving. A contract states what should arrive and the checks verify what did, and you need both because contracts are usually broken by accident.
Stop bad data before anyone reads it
Detecting a problem after the data is published only means you find out sooner, so the aim is to stop bad data reaching consumers at all.
The write-audit-publish pattern does this in three steps. The new batch is written to a staging table or branch that consumers cannot see, and the checks run against it there. Only if they pass is it published, through an atomic operation such as a partition swap or table rename, or a commit to the table format. If the audit fails, the published table still holds the last good data and the pipeline stops with a clear error.
Three practices support the pattern.
Loads that are idempotent. A load that can be rerun without changing the result removes the duplicate problem at its source, usually by replacing a whole partition in place of appending to it or by merging on a business key, so that a retry after a failure is safe.
A quarantine for bad records. When a few rows fail validation, they can be parked in a quarantine table with the reason while the rest load. This needs a limit, because once more than a handful are rejected the problem lies with the batch and the run should stop.
Defaults that never hide faults. An unparseable date should not become a placeholder, nor a missing amount zero. The row should go to quarantine or keep its null for a completeness check to judge, since a default conceals the fault and corrupts every aggregate built on it.
Blocking, warning and the cost of noise
Failing loudly has a price. A blocked pipeline means late data, and a team that blocks on every anomaly will eventually be told to switch the checks off, while at the other extreme so many warnings go out that none are read.
Checks fall into two classes. Blocking checks cover conditions that are certainly wrong, such as zero rows or duplicate keys, a schema mismatch or a failed reconciliation, and they stop publication. Warning checks cover conditions that are unusual but might be real, such as volume slightly outside the normal range or a shift in a value's distribution, and these publish the data while notifying the owner.
Each alert then needs an owner, named directly or through a rota, along with a statement of what it means in business terms and the first action to take. An alert reading "Check failed: assert_17" at three in the morning tells the person on call very little, whereas "Sales feed from the supplier arrived at under half normal volume; published tables still hold yesterday; contact the supplier's operations desk" tells them what has happened and what to do.
Consumers should be told as well. A dashboard that shows "data as of" with the last successful load time lets a reader see that the numbers are a day old and decide accordingly. Stale data with a label is acceptable, whereas without one it is the same silent failure one layer further up. A shared definition of each figure, discussed in one definition per metric, also makes a discrepancy easier to trace.
Ownership of these rules is a governance matter as well as an engineering one, because someone has to decide what "complete" means for a dataset and who gets called when it falls short, and that decision is where data strategy and governance becomes practical.
The retailer's truncated feed
Consider a mid-size retailer that receives a nightly sales file from each store's point-of-sale system through a third-party aggregator. The file lands in object storage and a scheduled job loads it into the warehouse, where transformations build the daily sales tables that feed the store dashboards and a replenishment forecast.
One night the aggregator's export times out and delivers a file covering roughly a third of the stores. Because the file is well formed, the load succeeds and so does every transformation after it. The next morning the dashboards show sales well down, and the replenishment forecast, seeing low sales for the missing stores, cuts its order proposals for them. A regional manager questions the numbers that afternoon, after the orders have gone out.
The redesigned pipeline treats this as a known failure mode. The aggregator agrees to send a small manifest with each file that gives the store and row counts and the total sales value, and the load now writes to staging. Before publication the audit compares staged rows with the manifest, checks that the distinct store count is within one or two of the active store list, and compares the row count with the same weekday in recent weeks.
On a night like that one the store count check fails and nothing is published, while the on-call engineer receives an alert that names the feed and the size of the shortfall and gives the aggregator's contact details. Dashboards show the previous day's figures with a "data as of" label, and the forecast job, which checks its input's freshness, declines to run on stale data and says why.
The data is late that day, but no stock is ordered on numbers that were never true. Success is measured by how many incidents a consumer reports before a check does, and by the time from a bad load to someone knowing.
The limits of checking
Checks catch only what someone thought to check for. A source that starts sending amounts in cents in place of dollars will pass every structural test. Distribution checks and reconciliation against an independent total help, but some semantic errors will only be found when a person who knows the business looks at the numbers, so that review should stay.
Checks also cost compute and attention to run. Start with the tables that feed money and regulatory reports, customer-facing figures or models, and leave exploratory datasets lightly covered. Whether a flow should be checked per batch or continuously depends on how it runs, a choice examined in batch or streaming.
What to do next
- List the ten tables whose errors would cost the most, and for each one name the person who would be called.
- Add four blocking checks at the publication boundary of each of those tables, for volume and freshness, key uniqueness and schema.
- Ask each source for a control total and reconcile your loads against it.
- Search the code for handlers that catch an error and carry on, and for defaults that replace missing values, and remove or bound each one.
- Make loads idempotent, starting with the ones that are rerun most often.
- Put a "data as of" time on every dashboard and report.
Building these habits in is central to data engineering, and keeping them in place after go-live is the work of managed data operations. Both depend on accepting that a late answer is better than a wrong one.



