Data pipeline · Data consolidation · Leads and CRM · Cost-efficient scale
Built for millions of records a day, consolidated without big servers
A data pipeline, running in production, that captures changes from every system, keeps their full history and builds one current view of your leads and customers, on demand or daily.
A data pipeline, running in production, that brings leads and customer data from many systems into one current, trustworthy view. It is built for millions of records a day, without big servers. Each of your systems is only read, never changed. Every change is captured and kept as a full history, and a job turns that history into the latest picture of each lead or customer, on a schedule or whenever a team asks for it.
The problem it solves
Leads arrive from forms, campaigns, partners, branches and the CRM, and each one lives in its own system, in its own shape. Ask “how many leads came in this week, and from where?” and the answer depends on who you ask. The usual fixes all hurt. Exports are stale the moment they land, and nobody can say if they are complete. Reporting on the live systems slows down the people using them. And a pipeline on big, always-on servers works at first, then the bill makes it unfeasible as volume grows, and it still struggles on the busy days.
The cost shows up in the business: sales works from numbers it does not trust, analysts spend their time stitching exports together, and when a record goes missing nobody can prove where it was lost.
What you get
Volume without big servers: millions of records a day are captured, merged and rebuilt in batches, and you pay for the work done, with nothing idle in between.
Many sources, one picture: leads and customers from different systems end up in the same layout, and adding a source is configuration, not a new project.
Live systems left alone: sources are only read, so reporting never slows down the teams and customers using them.
Data you can vouch for: every change is accounted for, and when something stops or goes missing the right people get an alert in plain language.
Pipelines on demand: refresh the current view whenever a team needs it, or leave it on a schedule.
Room to grow: start with a daily consolidated file, and add a query layer or an advanced table format later without starting over.
How we deliver it
We start with a Systems Integration engagement, from what you have: which systems hold leads and customers, who reads them, and which questions they need answered. We connect one source first, read-only, and prove the copy matches the original. Then we add the other sources, set up the alerts and hand over a runbook, so your team can add the next source itself. When the questions get harder, an AI & Data Sprint adds the query layer on top. We need read access to each source and someone who knows what its fields mean.
Is it for you
It fits when leads and customer data sit in several systems, volume is growing, cost matters, and you need to show that nothing was lost. It is not for you if you need data second by second: changes land within minutes, and the consolidated view is built daily or on demand. It is also more than you need if a nightly export already answers your questions. Recognizing the same person across systems is a separate matching step that we would add, not part of the pipeline itself.
Tech
01Leads and customer records change in your systems
02Each change is picked up and kept, with its history
03Anything stuck or missing raises a plain-language alert
04A job builds one current view, on demand or daily
05Sales and analytics read it, never the live systems
Design goals
A change is never skipped silently: a delay is acceptable, a gap is not.
Progress moves only after the data is safely stored and checked.
Any step can run twice and give the same result, never a duplicate.
Sources are only ever read.
Cost follows the work done: no big servers, nothing idle.
Architecture
Sources
Leads databaseRead-only access
Customer databaseRead-only access
Other systemsAdded by configuration
Publishers
PublisherOne per source, scheduled
Data lake
Change filesAppend-only, by date
Progress markerThe authoritative position
Current viewOne file per dataset
Use
Consolidation jobOn demand or daily
Sales and analyticsRead the current view
AlertsPlain-language email
Publishers. One small program per source, run on a schedule next to the data it reads, so no new servers are needed. Each asks only for what changed since its last position, ordered by the record’s last-modified time with its id as a tiebreak, and writes the answer as a compressed file with one record per line. Each run is capped, so a large backlog becomes several files in sequence, never one unbounded file.
Change files land in the lake in a partitioned layout (source, dataset, then date), so every source looks the same and a partitioned query table can be added on top later. They are encrypted at rest with a managed key, TLS is enforced by policy and public access is blocked. Each file has a small sidecar with its time window, record count and checksum.
The progress marker is a small file per dataset holding the last committed position. It lives in the lake, not on the server, so a replaced server resumes by itself.
The consolidation job is a serverless batch job. It reads a dataset’s change files, keeps the newest version of every record and writes one current file. It runs on demand or on a schedule, and you pay only while it runs.
Alerts come from three signals per source: how far behind the lake is, whether a run failed, and whether runs have stopped reporting. Each alarm emails a message that says what it means, whether data is at risk and what to check.
How the hard parts work
Never skipping a change
A write is stamped with its time before every reader can see it. If a publisher moved past that time before the write became visible, the change would be skipped forever, with no error and no trace. So the publisher never reads the most recent short window, trading a little freshness for completeness. Records stamped at the same instant are ordered by id, so the boundary between two runs is exact: no gap, no overlap.
Moving progress only when the data is safe
Read to the endA partial read never counts
Store the batchNamed after its time window
Verify the copyRead back and compare checksums
Move the markerProgress advances last
Fails closed. Any error stops the run, raises an alert and leaves progress where it was, so the next run retries the same window.
Progress is never based on “I read some records”. The run advances only after the source has been read to the end. The file is stored and then read back to compare its checksum, because a call that did not raise an error is not proof. The file name comes from the window it covers, not from a run id, so a retry overwrites the same file instead of creating a duplicate. The marker in the lake is authoritative and the local copy is only a cache: if they disagree, the lake wins. If the marker has vanished while local state exists, the publisher refuses to guess and raises an alert.
The first load
A boundary time is captured once, before anything is read. The first full load is a snapshot of everything up to that boundary, read in chunks so no cursor stays open for long and no file grows huge. The first incremental run then starts exactly at the boundary. If the load stops halfway, the next run resumes from the last committed chunk.
Building the current view
The job makes two passes and needs little memory: the first remembers only which line holds the newest version of each record, and the second copies those lines. Memory grows with the number of records, not their size, so a small job is enough. The new file replaces the old one only when it is complete. The job refuses to replace a view with a smaller one, because the sources mark records as deleted instead of removing them. A dataset with no records yet is skipped, not treated as an error.
Decisions
Question
Options
We chose
Why
How changes are captured
Database change streams; triggers; a last-modified cursor
Last-modified cursor with an id tiebreak
Works on any database version, needs no replication setup, adds nothing to the source’s writes
Where the publisher runs
An always-on collector; next to the source; managed streaming
A small scheduled program next to the source
No new servers, and cost follows the work done
File format
Columnar files; CSV; JSON lines
Compressed JSON lines
Records hold long text and nested fields, and one line per record survives intact
The current view
A rebuilt file; a table format with row-level merge; query tables
A rebuilt file
Simplest thing that works at this volume; the layout already fits partitioned query tables, and a merge-capable table format can replace the job when you need faster freshness or history
How people query it
A query engine billed per scan; files read by jobs
Files read by jobs, a query layer only if needed
A per-scan bill grows with every question asked
Where progress lives
A local file on the server; the lake
The lake, with a local cache
A replaced or rebuilt server resumes by itself
Guardrails
Security. Data is encrypted at rest with a managed key, plain-text connections are refused by policy and public access is blocked.
Least privilege. Each publisher can write only its own folders and can never delete. The sources are only read. The consolidation job writes only the current view.
Cost. Batch jobs bill only while they run. Monitoring is published per source, not per dataset, because every metric combination is billed on its own.
Reliability. Every step can be re-run, progress moves only after a verified upload, and a view can never be replaced by a smaller one.
User data. Every source has its own folders, so a reader role can be limited to the sources a team needs, and a team sees only its own source.
Failure modes
What breaks
What happens
A source database is down
The run fails and alerts, progress stays, the next run catches up
An upload or its check fails
Progress does not move, and the same window is retried to the same file
A publisher server is replaced
It reads the marker from the lake and resumes, with no manual reseeding
The scheduled job is removed or silenced
A “not running” alarm fires when reports stop
Someone writes to a source outside the application
Not seen, because the last-modified stamp is skipped (see trade-offs)
A dataset is still empty
The consolidation job skips it and succeeds
Trade-offs, and when not to use this
Changes land within minutes, behind a safety margin, and the current view is built daily or on demand: this is not real time. Capture depends on each record’s last-modified stamp, so a write made outside the application, which skips the stamp, is invisible to the publisher; a periodic count check against the source closes that gap, and it is not built yet. Hard deletes are not captured, so sources must mark records as deleted. Rebuilding the whole view each time is simple and heals itself, but its cost grows with total size; when that starts to matter, a table format with row-level merge replaces the job. Recognizing the same person across sources is a separate matching step, not included.
What we would measure
How far behind each source is, as a rolling lag.
Failed runs per source.
Records captured per day.
Time to build the current view at full volume.
Differences between source counts and the current view at cutover.
Monthly running cost.
Want something like this in your stack?
Tell us about your context and we will tell you what it would take.
An in-app AI agent, built to scale with your user base, that books, creates and changes things through your own API, with every answer checked in code against what actually happened.
A website AI assistant, running in production and built to scale with your traffic, that answers visitors from your own pages, offers your case studies and captures leads, checking every answer in code.
A massive campaign dispatcher, running in production in your own cloud account: it sends email campaigns to millions of recipients at a safe, steady pace, and tracks every delivery, open and bounce per recipient.