Skip to content

Self-Healing Ingestion

An automated ingestion platform that turned millions of messy supplier catalogue records a day into clean, trustworthy data: self-healing, and idempotent so a re-run repairs rather than doubles.

Science Warehouse ran procurement for much of UK higher education and the public sector, and a procurement platform is only as good as the supplier catalogues inside it. This was the pipeline that got them in: an automated ingestion platform in Java and Spring Batch, loading millions of supplier records a day. The throughput was the easy part to describe. The real difficulty was the data itself.

JavaSpring BatchMaven

The real difficulty: the data

Supplier catalogues did not arrive clean. They came in a mess of formats, often with fields missing, from many sources with no shared standard between them. A naive load would have carried all of that straight into the platform: gaps where prices and codes should be, duplicates stacking up, a single malformed file bringing down a run. At a handful of records that is a nuisance. At millions a day it is the whole problem.

A load that heals as it goes

So the load was built to heal as it went. Each catalogue was normalised onto a common shape, then read closely enough to fill what was missing: learning-based algorithms inferred the gaps a supplier had left, and the result was checked for correctness on the way in rather than taken on trust. Validation, transformation rules and de-duplication kept the clean data clean. A bad or partial record was set aside and handled, not left to break the run around it. The pipeline bent where the data was bad, rather than snapping.

The self-healing ingestion pipelineSupplier catalogues, arriving in many formats with fields missing, enter a pipeline of stages: normalise, fill gaps with learning-based inference, validate, and de-duplicate, producing clean data loaded into the platform. Records that are bad or partial are diverted and set aside so the run continues rather than breaking.Suppliercataloguesmessy · gappyNormaliseFill gapslearning-basedValidateDe-dupClean datainto the platformbad / partialSet aside, handledthe run continues
Messy supplier catalogues are normalised, gap-filled with learning-based inference, validated and de-duplicated into clean platform data; bad or partial records are set aside and handled rather than breaking the run.

Idempotency: safe to re-run

The property that tied it together was idempotency. A pipeline running millions of records a day will be interrupted: a feed drops halfway, a batch is re-sent, a run is retried after a crash. If a re-run doubles what it already loaded, every failure becomes a manual cleanup. So the load was made idempotent: running it again on the same input moves the state toward correct rather than duplicating it. A half-finished run could simply be run again. That is what lets an automated pipeline be left to run, instead of watched.

Idempotency: a re-run repairs rather than doublesTwo rows compare running the same load a second time. The naive load ends with its records doubled. The idempotent load ends with the same set of records as a single run, converging on the correct state. This is what makes a re-run safe after an interrupted or failed run.Running the same load againNaive loadrun again✗ doubledIdempotent loadrun again✓ same stateA re-run moves the state toward correct rather than doubling, so a half-finished run is simply run again.
The same load run twice: a naive load doubles what it already wrote, while the idempotent load converges on the same correct state, so a re-run repairs rather than duplicates.

Holding it at volume

All of it had to hold at volume. Spring Batch carried the throughput, millions of supplier records a day ingested, transformed and loaded automatically, and the platform’s data-ingestion errors came down as the pipeline took over work that had been fragile before. It was owned end to end within a small, focused team shipping to production.

Still the shape of the problem

The stack is more than a decade old and batch processing is out of fashion, but the shape of the problem is not. Messy input at scale, healing over brittle failure, and idempotency so a re-run is safe are the instincts every serious data pipeline still needs, whatever the tools on top. The catalogues were the hard part. Making the load survive them, at volume, without babysitting, was the craft.