{"id":"KM-DATA-0162","slug":"data-pipelines-architecture-guide","title":"Data Pipeline Architecture: Contracts and Recovery","excerpt":"Choose data pipeline architecture by decision latency, evidence durability, transformation boundaries, contracts, access, lineage, and recovery rather than component count.","kind":"Guide","category":"data-analytics","tags":["data pipelines","data architecture","Apache Airflow","OpenLineage","IT managers"],"seoKeywords":["data pipeline architecture","data pipelines architecture guide","data pipeline design","data engineering architecture","reliable data pipelines"],"authorId":"krishnam-murarka","publishedAt":"2026-06-24","updatedAt":"2026-09-09","readingTime":"13 min read","image":"/social-images/blog/edilec-photo-km-data-0162-7b94d822a967.jpg","featured":false,"trending":false,"sourceCredits":[{"title":"Apache Airflow core concepts","url":"https://airflow.apache.org/docs/apache-airflow/stable/core-concepts/overview.html","author":"Apache Software Foundation"},{"title":"OpenLineage object model","url":"https://openlineage.io/docs/spec/object-model/","author":"OpenLineage"},{"title":"Apache Kafka 4.3 Design","url":"https://kafka.apache.org/43/design/design/","author":"Apache Software Foundation"},{"title":"NIST SP 800-53 Rev. 5","url":"https://csrc.nist.gov/pubs/sp/800/53/r5/upd1/final","author":"National Institute of Standards and Technology"},{"title":"W3C PROV-DM","url":"https://www.w3.org/TR/prov-dm/","author":"W3C"}],"researchSources":[{"title":"Apache Airflow core concepts","url":"https://airflow.apache.org/docs/apache-airflow/stable/core-concepts/overview.html","author":"Apache Software Foundation","reason":"workflow orchestration, tasks, dependencies, and scheduling"},{"title":"OpenLineage object model","url":"https://openlineage.io/docs/spec/object-model/","author":"OpenLineage","reason":"dataset, job, run, and facet metadata for traceability"},{"title":"Apache Kafka 4.3 Design","url":"https://kafka.apache.org/43/design/design/","author":"Apache Software Foundation","reason":"durable streams, partitions, consumers, and operations"},{"title":"NIST SP 800-53 Rev. 5","url":"https://csrc.nist.gov/pubs/sp/800/53/r5/upd1/final","author":"National Institute of Standards and Technology","reason":"risk-based access, audit, configuration, and recovery controls"},{"title":"W3C PROV-DM","url":"https://www.w3.org/TR/prov-dm/","author":"W3C","reason":"provenance records for evidence and responsibility"}],"mediaAssets":[],"status":"published","body":[{"type":"heading","id":"data-pipelines-architecture","text":"Data Pipeline Architecture: Contracts and Recovery","depth":1},{"type":"paragraph","text":"Data pipeline architecture is the set of boundaries, contracts, controls, and operating choices that move evidence from producers to decisions. Strong architecture is not the one with the most services; it is the one that makes timing, identity, transformation, access, quality, provenance, and recovery visible at the point of consequence. A workforce plan may need a scheduled extract and certified dashboard, while fraud response may need event ingestion and state. Begin with response objective and correction behavior, then choose components the team can observe and recover."},{"type":"heading","id":"data-pipelines-architecture-principles","text":"Set architecture from the response contract","depth":2},{"type":"paragraph","text":"Define the consumer, action, cadence, freshness target, input sources, permitted access, output grain, quality conditions, and recovery objective. Name event time and processing time when they differ. Decide whether late records amend a published result, wait for a correction window, or are excluded with a visible qualification. Establish a data contract for schema, keys, units, allowed values, and ownership. A contract is most useful when incompatible changes can block publication or trigger a planned transition. Record source and destination identifiers, run or offset state, version, and downstream impact. The [plain-language pipeline guide](/blog/km-data-0142/the-plain-language-guide-to-data-pipelines/) is useful for aligning architectural terms with decisions that non-specialists can evaluate."},{"type":"table","columns":["Architectural choice","Choose based on","Evidence to test"],"rows":[["Batch or stream","Decision latency, ordering, state, correction, and cost.","Late data, replay, throughput, and user response."],["Storage boundary","Replay, retention, access, performance, and recovery.","Restore, backfill, deletion, and permission behavior."],["Transformation layer","Semantic logic, reuse, testing, and ownership.","Model contract, tests, version, and dependency map."],["Publication surface","Audience, freshness, detail, and action.","Status, access, lineage, and representative decision."]]},{"type":"heading","id":"data-pipelines-architecture-layers","text":"Give each layer a distinct evidence responsibility","depth":2},{"type":"paragraph","text":"A resilient architecture usually separates four concerns. The evidence layer receives and preserves source-shaped records, identities, timestamps, and access context. The computation layer schedules or streams transformations, manages state, retries, and resource use. The meaning layer applies models, contracts, metrics, and business rules. The use layer publishes tables, APIs, dashboards, or alerts with freshness, scope, limitations, and audience controls. The boundaries do not have to be separate products, but they should be separate responsibilities. OpenLineage's jobs, runs, and datasets provide a useful metadata pattern for observing these boundaries; Apache Airflow's DAG, task, and scheduling concepts help make orchestration explicit."},{"type":"image","src":"/social-images/blog/edilec-photo-km-data-0162-7b94d822a967.jpg","alt":"A research planning room shows a pipeline holding a late record for contract and correction review.","caption":"Data pipeline architecture separates evidence, computation, meaning and use, with explicit treatment of late records and corrections.","width":1200,"height":750},{"type":"paragraph","text":"Durability and isolation matter. Keep raw or source-shaped evidence long enough to support the stated recovery and retention need; isolate sensitive data and restrict access by purpose; version transformations and configurations; and retain audit evidence for releases and corrections. Kafka can provide durable event transport, but partitions, retention, consumer progress, and reprocessing semantics become architectural commitments. A warehouse can simplify analytical transformations, but incremental logic, backfills, and access grants need explicit behavior. Tie resource and security choices to the NIST control families that matter—access control, audit and accountability, configuration management, contingency planning, incident response, and system integrity—rather than applying a generic checklist without owners."},{"type":"table","columns":["Layer","Primary responsibility","Control questions"],"rows":[["Evidence","Capture, preserve, classify, and retain source context.","Can we identify, replay, delete, or restrict the record?"],["Computation","Schedule, process, retry, scale, and isolate work.","Can we distinguish retry from duplicate and see resource pressure?"],["Meaning","Transform, test, version, and explain business definitions.","Can a reviewer trace a metric and detect breaking change?"],["Use and operations","Publish, secure, monitor, communicate, and improve.","Can a user see status and an operator restore service?"]]},{"type":"heading","id":"data-pipelines-architecture-reliability","text":"Design lateness, replay, and access as state","depth":2},{"type":"paragraph","text":"Assume sources will be late, schemas will evolve, events will duplicate, dependencies will fail, and business definitions will change. Use idempotent writes or explicit deduplication keys, bounded retries, dead-letter or quarantine paths, schema compatibility checks, and reconciliation. A rollback should identify which code, configuration, schema, and output state can be restored; it should not silently reintroduce a credential or reapply an external side effect. A backfill should have a bounded input range, versioned logic, isolated validation, merge strategy, and downstream communication. Keep run IDs, offsets or watermarks, input cutoffs, quality results, and publication state together. The [data lineage guide](/blog/km-data-0112/a-field-guide-to-data-lineage-for-growing-teams/) helps connect these records to impact analysis and ownership."},{"type":"paragraph","text":"Use progressive delivery for major changes. Test on representative samples, compare output distributions and control totals, run shadow or dual computation when consequences justify it, then promote with an explicit effective time. Observe both system signals and business outcomes. A pipeline can be fast and available while publishing a wrong population. Conversely, a delayed source may be a safe qualified state if the user sees the cutoff and uses an approved fallback. Decide these states in advance and expose them in the destination. A green scheduler should never be the only authority for a financial, compliance, customer, or operational action."},{"type":"heading","id":"data-pipelines-architecture-operations","text":"Operate architecture with outcome-oriented signals","depth":2},{"type":"paragraph","text":"Set service indicators that reflect the decision: freshness, end-to-end latency, completeness, reconciliation, failed-run recovery, lag, cost, access denials, test failures, and unresolved exceptions. Track saturation in compute, storage, queues, partitions, and warehouse workloads. Attach alerts to owners and runbooks; an alert without a response decision becomes noise. Review a normal run, a late source, a schema change, a backfill, and an access incident. Measure time to detect, explain, contain, recover, and communicate. Retire components, datasets, jobs, and grants when their consumers disappear. Architecture governance is not a meeting that approves diagrams; it is the recurring practice of checking whether boundaries still match decisions and risk."},{"type":"heading","id":"data-pipelines-architecture-review","text":"Review the design through a concrete failure walk","depth":2},{"type":"paragraph","text":"A useful architecture review starts with a failure scenario rather than a component diagram. Ask what happens when a source is late, a schema changes, a consumer is unavailable, a queue grows, a warehouse is restored, an identity is revoked, or a backfill produces a different total. Trace the state across evidence, computation, meaning, publication, and operations. Identify which boundary owns the next decision and what evidence survives. This exposes designs that are complete only in the happy path, such as a stream with no replay contract or a warehouse model with no certified cutoff."},{"type":"paragraph","text":"After the review, record architectural decisions in terms the operating team can use: the reason for batch or stream, the retention and deletion rule, the allowed recovery point, the contract versioning policy, the access boundary, and the indicator that says the service is healthy. Revisit these decisions after a material change in volume, latency, data classification, ownership, or consumer behavior. Architecture is a living response to risk; a stale decision record is itself a hidden dependency."},{"type":"paragraph","text":"Related Edilec reading: [real-time analytics buyer and CTO guide](/blog/km-data-0018/real-time-analytics-buyer-and-cto-guide/), [data lineage architecture](/blog/km-data-0012/data-lineage-architecture-guide/), and [how founders should think about dbt models](/blog/km-data-0025/how-founders-should-think-about-dbt-models/) connect architecture choices to governance and adoption."},{"type":"paragraph","text":"Source context: [Airflow core concepts](https://airflow.apache.org/docs/apache-airflow/stable/core-concepts/overview.html) describes orchestration boundaries; [OpenLineage](https://openlineage.io/docs/spec/object-model/) supplies job, run, and dataset metadata; [Apache Kafka 4.3 Design](https://kafka.apache.org/43/design/design/) covers durable streams and consumer operations; and [NIST SP 800-53](https://csrc.nist.gov/pubs/sp/800/53/r5/upd1/final) organizes access, audit, configuration, incident, and contingency controls."},{"type":"heading","id":"data-pipelines-architecture-takeaways","text":"Key takeaways","depth":2},{"type":"list","items":["Choose architecture from decision latency, correction behavior, evidence durability, and risk.","Separate source evidence, computation, semantic meaning, and publication responsibilities.","Make contracts, lineage, tests, access, run state, and recovery part of the architecture.","Design for late data, duplicates, schema change, backfill, rollback, and provider failure before launch.","Operate as a service with outcome-oriented indicators, owners, runbooks, and retirement decisions."]},{"type":"heading","id":"data-pipelines-architecture-faq","text":"Frequently asked questions","depth":2},{"type":"heading","id":"data-pipelines-architecture-faq-stream","text":"Should every modern pipeline be real time?","depth":3},{"type":"paragraph","text":"No. Real-time processing is justified when lower latency changes an action and the team can handle ordering, state, duplicates, retention, and correction. For many planning, finance, and management decisions, a certified batch path is simpler and more explainable."},{"type":"heading","id":"data-pipelines-architecture-faq-raw","text":"Should we keep raw data forever?","depth":3},{"type":"paragraph","text":"Keep source-shaped evidence for the recovery, audit, reproducibility, and retention need, then apply classification, deletion, and access policy. “Raw” is not automatically safe or authoritative; document purpose and lifecycle rather than assuming unlimited retention is useful."},{"type":"heading","id":"data-pipelines-architecture-faq-tool","text":"How many tools should a pipeline platform use?","depth":3},{"type":"paragraph","text":"Use as few as support clear boundaries, reliability, security, and recovery. More tools can separate responsibilities, but they also add identities, contracts, failure modes, and operating cost. Prefer evidence from a narrow working path over a broad platform inventory."},{"type":"paragraph","text":"Walk a compliance export from source arrival to approved delivery. Record source identity, cutoff, schema, landing retention, transformation version, tests, lineage, access decision, publication state, and recovery point. Then simulate a late source, a schema addition, a warehouse restore, an unavailable consumer, and a backfill with a changed control total. For each case, name the layer that owns the next decision, the evidence shown to the user, and the safe replay boundary. The architecture is ready to grow when the exercise produces decisions rather than a preferred list of tools."},{"type":"heading","id":"data-pipelines-architecture-conclusion","text":"Data Pipeline Architecture: a decision you can operate","depth":2},{"type":"paragraph","text":"A data pipeline architecture earns trust by preserving the evidence needed to explain an output and by making failure states safe to operate. Give capture, processing, meaning, publication, and operations distinct responsibilities; define lateness, correction, access, retention, and replay; and review the design with a real failure walk."},{"type":"paragraph","text":"Test the architecture with a failure walk for a compliance export. Ask what happens when the source arrives late, the schema adds a field, the warehouse is restored from backup, the export consumer is unavailable, an identity is revoked, and a backfill produces a different control total. For each case, name the layer that owns the next decision, the state visible to the user, the evidence preserved for investigation, and the recovery point that is safe to replay. A durable landing zone is useful only if retention and deletion rules are clear. A stream is useful only if offsets, partition ownership, late events, and side effects can be bounded. A model contract is useful only if an incompatible output blocks publication or triggers a migration. The review should leave a decision record, not a preferred tool list."},{"type":"paragraph","text":"Add capacity or components only when observed volume, latency, recovery, or control needs justify them. The strongest architecture lets an operator see what is certified, what is limited, who owns the next action, and how to repair the affected interval."},{"type":"image","src":"/attachments/article-media/editorial/edilec-batch102-data-pipelines-layered-architecture-decision-path.svg","alt":"Data pipelines layered architecture decision path","caption":"A six-stage architecture path from decision contract to outcome-oriented operation and retirement."}],"faqs":[{"question":"Should every modern pipeline be real time?","answer":"No. Choose streaming when lower latency changes the action and the team can operate its added state and recovery complexity. For many planning and management decisions, a certified batch path is simpler and more explainable."},{"question":"Should we keep raw data forever?","answer":"Retain source-shaped evidence only for a stated recovery, audit, reproducibility, or business need with classification and deletion controls. Document purpose, access, and expiry rather than assuming unlimited retention is useful."},{"question":"How many tools should a pipeline platform use?","answer":"Use the fewest that create clear boundaries, evidence, security, reliability, and recovery for the decision. Each additional tool adds identities, contracts, failure modes, and operating cost that need an owner."}],"relatedIds":["KM-DATA-0018","KM-DATA-0012","KM-DATA-0025"],"relatedArticleIds":["KM-DATA-0018","KM-DATA-0012","KM-DATA-0025"]}