Skip to content

Lesson 9 of 9 · 23m

Production Readiness: Ownership, Runbooks, and Safe Change

Turn pipelines into operable products with explicit ownership, deployment discipline, recovery procedures, documentation, and change management.

The difference between a script and a production pipeline is not the size of the data. It is whether another engineer can operate it at 3 AM without inventing missing context. Production readiness is mostly unglamorous: owners, runbooks, permissions, deployment discipline, tested recovery, and a clear understanding of what breaking means. Brilliant transformations do not compensate for operational ambiguity.

Every pipeline needs an owner and a consumer contract

Write down who owns the pipeline, who consumes it, what freshness is promised, and what correctness means:

pipeline             orders_daily
owner                revenue-data team
consumers            finance close, revenue dashboard, churn model
freshness target     published by 07:00 UTC
correctness contract one row per order_id; amounts in cents; corrections restated 7 days
impact if broken     finance close blocked; model uses stale features after 24h

This is not bureaucracy. It is the difference between a warning and a page.

Deploy like software, because it is software

Data pipelines deserve version control, review, tests, staging environments, and controlled rollout:

1. unit tests and SQL compile checks pass
2. sample-input integration test passes
3. schema compatibility and backfill impact reviewed
4. alerts, ownership, and rollback plan updated

If deploying means copying SQL into a production scheduler by hand, you have built a future incident with a keyboard shortcut.

Runbooks should be operational, not philosophical

A useful runbook answers immediate questions:

## orders_daily failure
1. Check source freshness in `pipeline_runs` for the logical date.
2. If validation failed, inspect `orders_rejected` before rerunning.
3. Rerun with `--write-mode replace-partition` after root cause is fixed.
4. Notify #finance-data if publication will miss 07:00 UTC.

Give commands, boundaries, escalation points, and prohibited actions. "Investigate the issue" is not a runbook step.

Safe change and recovery require practice

Use shadow tables, feature flags, canary partitions, or parallel runs to shrink blast radius. Compare outputs before cutting over:

SELECT count(*) AS mismatches
FROM current_orders c
FULL OUTER JOIN candidate_orders n USING (order_id)
WHERE c.total_cents IS DISTINCT FROM n.total_cents;

Practice recovery before you need it: replay a day, deploy the previous version, and identify downstream consumers of a bad partition. If those answers rely on one senior engineer's memory, recovery is not tested.

Field notes

  • Least-privilege credentials matter in data platforms because pipelines often hold broad read access to production systems.
  • Rotate secrets and inventory where they are used before the rotation deadline, not after jobs fail.
  • Keep a dependency map even if it starts as a spreadsheet. Unknown consumers make safe change impossible.
  • Decommission pipelines explicitly. Zombie jobs still cost money, hold credentials, and confuse incident response.

Was this lesson helpful?

Sign in to rate