Data and analytics

Data engineering

Pipelines that catch bad data, rerun safely and are documented well enough to hand over.

How we do it

Overview

Most data pipelines begin as a nightly job that copies a table, and that first version can run for months without trouble. The problems arrive later, when a source team adds a column, a file is delivered twice, an API returns a partial page, or someone reruns a failed job and it loads the same day a second time. In most of these cases the job still reports success. The warehouse ends up holding figures that are slightly wrong, and it can take weeks before anyone traces the discrepancy back to the load that caused it.

What separates a pipeline from a script is how it behaves when something upstream goes wrong. A well-built pipeline can be rerun without creating duplicates, and it notices when a load is late or only half its usual size. It also stops bad data before it reaches a report and tells the person who owns the table what happened. These behaviors have to be designed in at the start, because adding them afterwards to several hundred jobs that were written without them is slow and expensive work.

We build data pipelines with the same engineering practices a careful team applies to application code. Transformations are kept in version control and tested on every change and every load, development and production run in separate environments, and deployments go through an automated pipeline so that no one has to release by hand. We start from batch processing and add streaming only where a decision depends on data that is seconds or minutes old, since streaming costs more to build and a good deal more to operate.

Challenges we address

The failures we are usually called in to fix
  1. Jobs that succeed with wrong data

    The orchestrator reports success because the job ran to completion, even though the source file was empty or a join dropped rows after a key changed format. Since nothing checks whether the data itself is right, the first person to notice is usually an analyst whose numbers look odd.

  2. Reruns that create duplicates

    When a load fails halfway and is started again, the rows from the first attempt are often still in the table. That inflates the totals for the day, and the usual fix is a hand-written delete statement that somebody has to remember to run each time it happens.

  3. Schema changes surface downstream first

    A source team adds, renames or retypes a column. Depending on the tool, the pipeline then fails overnight or keeps running and fills the new column with nulls, and in both cases the people who use the table tend to find out before the people who maintain it.

  4. Business logic scattered across tools

    Business rules end up spread across ingestion scripts, stored procedures, the transformation layer and dashboard calculations, so the same filter may be written four different ways. Changing a definition then means hunting down every copy, and the team can rarely be sure it has found them all.

  5. One engineer understands the pipelines

    The jobs were built up over several years by one person, who knows which of them to restart after a failure and in what order. With no runbooks and few tests, that person's holidays become a risk to the business and every new request has to wait for them.

Our approach

How the work runs, in order
  1. Map sources and consumers

    We list each source along with how it can be read (database log, API, file drop or event stream), how often it changes and who uses the result. With each consuming team we then agree how fresh the data has to be, which settles the choice between batch and streaming and heads off most over-engineering.

  2. Land raw, then transform

    We load data unchanged into a raw layer first, together with load metadata, so that any transformation can be rebuilt from history without going back to the source. Cleaning and business logic come afterwards, in SQL or Python models that are versioned, reviewed and arranged in layers from staging through to marts.

  3. Make every load idempotent

    We write each job so that running it twice leaves the same result as running it once, using a merge on keys, a partition overwrite or deduplication on an event identifier depending on the source. Incremental loads track a watermark and allow for records that arrive late, and backfills go through the same code path as the daily runs.

  4. Test the data and the code

    Checks for uniqueness, nulls, referential integrity, accepted values, row volume and freshness run on every load, and a failure on a critical table stops the downstream models and alerts the table's owner. The transformation logic also has unit tests that run against small fixed inputs in the delivery pipeline whenever the code changes.

  5. Operate, document, hand over

    Orchestration is set up with retries and backoff, timeouts, alerting and a dependency graph that people can read. Every pipeline gets a runbook covering what it does, the ways it tends to fail and how to rerun it. Your engineers join the on-call rotation while we are still working alongside them, which means the handover has been tried out before it becomes final.

Technical capabilities

What we design, build and operate
  • Batch ingestion

    We build scheduled extraction from databases, SaaS APIs and file drops, including incremental loading and the handling of pagination and rate limits. Schema drift is detected when the data lands.

  • Change data capture

    For operational databases such as PostgreSQL, MySQL, SQL Server and Oracle we use log-based replication, which captures inserts, updates and deletes without putting extra query load on the source.

  • Streaming pipelines

    We build event ingestion and stream processing with delivery semantics that are agreed up front. The pipelines handle late and out-of-order events, route failures to a dead-letter queue and can replay from retained logs.

  • Transformation and modelling

    Layered SQL and Python models that run from staging to dimensional marts. This includes slowly changing dimensions and incremental builds, with documentation generated from the code itself.

  • Data testing

    Every load runs schema, volume, freshness and business-rule tests, and the transformation logic has its own unit tests. Before a change merges, we compare the development output against production.

  • Orchestration and scheduling

    Scheduling that understands dependencies and supports retries, backfills and sensors that wait for upstream data to arrive. When a table is late, the alert says which one and who owns it.

  • Delivery pipeline for data

    Pipeline changes go through version control, code review, isolated development schemas, automated test runs and promoted deployments, which is the same path an application change would follow.

  • Feeds back to operational systems

    Tested outputs can be sent from the warehouse into the systems where people do their work, for example scores into the CRM or segments into a marketing tool. We monitor these feeds in the same way as any inbound load.

Where it applies

Business applications
  • Feeding a warehouse or lakehouse

    ERP, CRM, finance and product data brought into one modelled store, refreshed on a schedule that each consuming team has agreed to.

  • Data for retrieval and AI features

    We prepare and refresh the documents, records and embeddings that an assistant searches, so that its answers reflect yesterday's changes and do not depend on an export from last quarter.

  • Operational reporting

    Views of orders, inventory or service queues that are close to real time, for situations where a supervisor needs to act within the hour and a nightly batch would arrive too late.

  • Regulatory and finance submissions

    Figures for month-end close or a regulator, produced in a repeatable and auditable way so that any run can be reproduced from the raw layer.

  • Features for machine learning

    Training and scoring datasets built from the same transformation code, which means a model sees the same logic in production that it saw in development.

  • Replacing spreadsheet handoffs

    The weekly routine in which one team exports a file, pastes it into a spreadsheet and emails it to another, replaced by a tested pipeline that has an owner and an alert.

In practice

Two situations this service is built for, and what we would do in each.

Manufacturing

Nightly loads that pass while the numbers are wrong

The situation
A manufacturer loads production, quality and ERP data every night using scripts that were written over several years. The jobs report success, but plant managers regularly find that yesterday's output figures are incomplete. The data team usually hears about a problem by phone and then spends the morning rerunning jobs by hand, in an order that only one engineer knows.
What we would build
We would land each source unchanged in a raw layer, rebuild the transformations as versioned models and make every load safe to rerun. Volume and freshness checks would compare each load with recent history, so that a failure on a core table blocks the models that depend on it. We would also move the dependencies into an orchestrator and write a runbook for each pipeline.
What it is designed to change
The aim is for incomplete loads to be caught by a check before plant managers open their reports. We would track how many data incidents are found by tests compared with how many are reported by users, along with the time it takes to get from a failed load to a completed rerun.
Logistics and supply chain

Shipment status that needs to reach dispatch in minutes

The situation
A logistics operator updates shipment status in a nightly batch, so dispatchers plan the morning from data that is hours old and customer service cannot see an exception until the following day. An earlier attempt to poll the operational database every few minutes was abandoned because it slowed down the application that drivers depend on.
What we would build
We would capture changes from the database log, which avoids querying the tables directly, and publish them to an event stream. A small stream job would then maintain the current status of each shipment and deal with late and duplicate events. The nightly batch would stay in place for finance and history, sharing its definitions with the stream and being reconciled against it every day.
What it is designed to change
Dispatch and customer service would work from status that is a few minutes old, without any extra query load on the operational database. Success would be judged on the latency from scan to screen and on the size of the daily reconciliation difference between the stream and the batch.

Technologies

We work in your stack and recommend on fit. We resell nothing.
Ingestion and change data capture
Fivetran · Airbyte · Debezium · Kafka Connect · AWS Database Migration Service
Transformation
dbt · SQLMesh · Dataform · Apache Spark · Python with pandas or Polars
Orchestration
Apache Airflow · Dagster · Prefect · Azure Data Factory · AWS Step Functions
Streaming
Apache Kafka · Amazon Kinesis · Google Pub/Sub · Azure Event Hubs · Apache Flink · Spark Structured Streaming
Testing and observability
dbt tests · Great Expectations · Soda · OpenLineage · Monte Carlo

Business outcomes

What changes for the organization
  • Bad data stopped before the report

    A failed check halts the affected models and alerts their owner. Users then see yesterday's correct figures with a notice explaining the delay, which is better than seeing today's figures when they are wrong.

  • Failures that recover or explain themselves

    Transient errors are retried automatically. Anything else produces an alert that names the table, the cause and the relevant runbook, so a failure no longer shows up first as an unexplained gap in a chart.

  • Model changes shipped without guesswork

    A new column or a changed rule goes through review and automated tests on realistic data, so the engineer editing a model can see what else the change affects before it is deployed.

  • Pipelines that more than one engineer can run

    Any engineer on the rotation can rerun, backfill or extend a pipeline by working from the runbook and the code, because what used to be one person's knowledge has been documented and covered by tests.

What you hold at the end

  • Pipelines in your repository, with code review history
  • A raw layer that every model can be rebuilt from
  • Data tests on every load, with alerts routed to owners
  • Orchestration with retries, backfills and dependency graphs
  • A runbook for each pipeline: purpose, failure modes, rerun steps
  • A delivery pipeline with separate development and production environments
  • Source and model documentation generated from the code

Questions buyers ask

It depends on who acts on the data and how soon they need it. If decisions are made daily or hourly, batch is enough, and micro-batches every few minutes will cover many requirements that are described as real time. Streaming is justified when a person or a system has to react within seconds or a few minutes, as with fraud checks, live operational status or event-driven features. Because it brings ordering problems, late events and state management with it, we recommend streaming only where the freshness requirement has been confirmed and written down.

For common sources, use a managed or open-source connector if a well-maintained one exists, because it saves a great deal of work on pagination, authentication and schema changes. It makes sense to write your own for unusual internal systems, for high-volume sources where usage-based pricing gets expensive, and for cases that need specific ordering guarantees. Most organizations end up with a mix of both. We decide source by source and record the reasoning in the decision log.

With a cloud warehouse or lakehouse it is usually better to transform after loading. You load the raw data first and then transform it inside the platform with versioned SQL, which keeps the history, makes rebuilds possible and uses compute you are already paying for. Transforming before loading still makes sense when data has to be masked or filtered before it is allowed to land, or when the source produces far more data than anyone is going to query.

Yes, and in most cases that is the right thing to do. We do not rewrite jobs that work because we would have built them differently. We add tests and alerting around what is already there, fix the pipelines that fail most often, and rebuild only where a job cannot be made idempotent or testable in its current form. A two-week review will tell you which pipelines fall into which group, ranked by how much damage each one causes when it breaks.

We assume it will change without warning and build for that. Schema and volume are validated when the data lands, records that fail are quarantined (we do not drop them), and the raw payload is kept so that nothing is lost while a fix is written. If the source team is willing, we agree a data contract with them. With an outside vendor that is rarely possible, so the checks at the boundary have to do the job a contract would.

Discuss data engineering with the people who would do the work.

Tell us what you are trying to do and where it is stuck. A principal reads every message and replies within one working day.

How we engage

Start a conversation.

A short paragraph is enough. A principal reads every message and replies within one working day.

Or email hello@farside.works. We use what you send only to reply. Privacy