Read the file
295,481 rows in one flat file, each repeating its restaurant and its visit.
Case study · Data migration
Designed, built and tested by HyperScale.
We built a staged pipeline that counts and checks data before it reaches the target, and we test it on public and generated datasets. Below is one rehearsal in full: New York City’s public restaurant-inspection file, 295,481 rows, run in March 2026 on our earlier pipeline.

01The problem
New York City publishes every inspection as one flat file. Each row repeats the restaurant and the visit, some rows record no violation, and some visits are dated 1 January 1900. A migration of data like this can lose or change rows quietly, and the damage is often found only after the old system is gone.
02What we built
An eight-stage pipeline from PostgreSQL to PostgreSQL, plus a separate CSV import service. Row counts, null checks and type checks run before a load, and before a cutover can be queued a second staff member must sign off.
03What it showed
In a deliberate failure test on the current engine, validation stopped the job, the load never ran and the target was untouched. In the March rehearsal below, on an earlier pipeline, 295,481 source rows became 3 linked tables in about 4 min 30 s, with no record left orphaned.
One file in, three tables out
The file wrote every restaurant and every visit out again on each violation. Split into three tables, each restaurant is stored once, each visit once, and each violation is linked to the visit it was found on.
How the run went
What each step did with this file, in the March rehearsal.
295,481 rows in one flat file, each repeating its restaurant and its visit.
Each restaurant and each visit stored once; impossible dates and empty rows set aside and counted.
Row counts reconciled and every link between records checked against the source.
Rows that could not be true, or held nothing at all, were set aside and counted, never loaded as if they were real.
| Item | Count |
|---|---|
| Rows with no violation | 5,727 |
| Visits dated 1 January 1900 | 3,425 |
Reading the file was the quick part. Most of the time went into building the three tables and linking them.
| Item | Count |
|---|---|
| Reading the file | 90 s |
| Building the three tables | 180 s |
1,094 rows a second, start to finish
After the move
Every source row is accounted for: loaded, folded into its restaurant or visit, or set aside and counted.
Every inspection has its restaurant, and every violation its inspection.
Every value that was loaded converted to its type without an error.
The run tested us too
A rehearsal is for finding problems before real data is at stake. This one found faults in our own pipeline, and each was corrected.
An automatic review was meant to run after the migration. It was starting and then stopping without a word, because of three separate set-up faults. All three were fixed.
For a client: a migration with no review behind it, and nobody aware.
It looked for information under names that had since changed, so its findings would have been incomplete. Every lookup was checked against the system as it really is.
For a client: a report that leaves things out without saying so.
Running the review again on a finished migration recorded worse figures and flagged four problems that did not exist. It was changed to recognise a job it has already measured.
For a client: time lost chasing problems that are not there.
The safety checks that run before a migration needed a tool that was missing, so six of ten never ran. They were rebuilt so they no longer depend on it.
For a client: starting a migration with less protection than promised.
The current engine runs eight stages from PostgreSQL to PostgreSQL and was tested on a generated 200,000-row dataset, with checksums asserted when the pipeline has not deliberately changed a table. A 400,000-row CSV import was killed at 49,400 rows and resumed with no duplicates. An earlier Airbyte-based pipeline produced the run on this page on 28–29 March 2026, and in the same month moved the public TPC-H benchmark (8,661,245 rows) with row counts and aggregate checksums matching. Before a cutover can be queued, a second staff member must sign off, and a 72-hour wait applies unless another named staff member approves it early.
We rehearse on a copy of your data first, and you sign off before anything moves.
Book a call