Main Point
A pipeline must preserve meaning through movement, delay, retries and corrections. Choose its sequence and processing cadence from the task, then test which effects survive failure and recovery.
Key Points
- Extraction obtains source information; transformation changes or combines its representation; loading places it in a target.
- ETL performs major transformation before target loading. ELT performs it in the target after loading. Both need permissions, validation and recovery controls.
- Batch groups work; streaming supports a continuing flow. Neither label establishes completeness or correctness.
- Event time and processing time answer different questions. Late data needs an explicit rule.
- Stable event identity, safe retry effects and ordered source changes prevent different classes of error.
1. Move the representation deliberately
Continue the fictional order-and-returns assistant. A source handling cost of 1,500 cents, already identified as USD, becomes $15.00. That is a unit conversion, with its source meaning retained. A missing or wrong currency remains a problem; dividing by 100 cannot repair it.
In an ETL route the example proceeds through extraction, conversion/checking, then loading into the analytical target. In an ELT route the authorized source representation first enters a restricted target area, where the major conversion occurs. A required pre-transfer restriction remains a pre-transfer restriction in either design. Preserve only permitted source evidence, with controlled access and retention.
Microsoft’s Azure Architecture Center describes transformation before target loading in ETL and transformation within the target in ELT. The article is vendor guidance about these patterns; its product suggestions and performance descriptions are not acceptance evidence for this fictional business. The public article has no edition-specific URL; its linked metadata records 15 September 2025, and this package records retrieval on 29 October 2026. [MS-ETL]
Select from requirements: destination capability, source formats, sensitive fields, operating skill, recovery and cost. Record the transformation and source identity so that a downstream discrepancy can be investigated. Exact lineage mechanisms are developed in the next lesson.
2. Choose an appropriate cadence
A daily summary can process a bounded set at a scheduled or triggered time. A cancellation needed by an active assistant may justify a shorter, continuing update path. Define a usable maximum delay rather than assuming every task needs streaming.
Apache Flink 1.20.3 documentation distinguishes bounded and unbounded inputs. Its BATCH execution mode requires bounded input, while its STREAMING mode can process either. This implementation distinction prevents a misleading rule that “bounded always means it must use batch.” The lesson’s general batch/streaming distinction concerns how work is grouped and continued, rather than prescribing a particular engine. [FL-MODE]
3. Keep two times
Use UTC and midnight calendar boundaries for the following fictional case:
- Return R17 occurs on 1 May 2026 at 23:55 UTC.
- This pipeline processes the event on 2 May at 00:10 UTC.
- A May 1 summary has already been published at 00:05 UTC on May 2.
An event-date report attributes the return to May 1. A processing-date report attributes this handling of the event to May 2. Preserve both timestamps; do not rename the arrival time as the business event time.
For an event-date report, the late arrival might trigger an explicitly versioned revision or a reconciliation path. A rule that closes a reporting period permanently needs a visible treatment for excluded late data. Flink’s time documentation discusses out-of-order events, watermarks and allowed lateness. A watermark is a progress mechanism under the engine’s assumptions; it cannot prove that every real-world event has arrived. Exact late-data rules vary by pipeline. [FL-TIME]
A business day could use a different zone or cutoff. State those choices and convert consistently, including any daylight-saving rules. The arithmetic above has no daylight-saving ambiguity because the example uses UTC.
4. Retry an event without duplicating its effect
Imagine source event E17 describing R17. Its first delivery updates the destination, but confirmation is lost. An unguarded retry that increments a counter again produces two applications of one event. Keep a stable source-scoped event identity and a defined rule for whether it has already been applied.
The idempotent requirement in this example is one relevant business effect after repeated application of the same E17. Identity alone cannot guarantee this: the check and update must be coordinated safely, with persistent state appropriate to recovery. Separate effects such as notifications and payment requests need their own end-to-end design. No exactly-once service guarantee is asserted here.
RFC 9110 §9.2.2 defines idempotence for the intended server effect of repeated identical HTTP requests. That is a precise example of a scoped guarantee, published June 2022. It does not establish that a pipeline’s arbitrary operation, POST endpoint, side effect or payment is idempotent. Our pipeline retry requirement applies the underlying principle to an explicitly defined business effect. [RFC-IDEM]
Do not deduplicate solely by order_id: one order can have several legitimate returns. Also distinguish event delivery identity from the identity of a record whose state can later change.
5. Apply corrections and deletions
A later source change E19 updates return R17 from received to canceled. A new-rows-only copy can leave its destination stale even if new rows arrive rapidly. CDC can supply relevant source changes; the selected connector must actually capture and the destination must actually apply them. Preserve record identity and a usable change-order rule so that a replay of older state cannot overwrite the correction.
PostgreSQL 18 publications can select INSERT, UPDATE, DELETE and TRUNCATE operations. Updates and deletes require an appropriate replica identity for locating the affected row. These statements describe that mechanism and configuration, not every CDC product. Schema changes, connector retention, filters, restart positions and destination effects require separate checks. [PG-CDC]
Removing R17 from a current view does not establish deletion from every archive, log, backup or derived copy. Record what was changed and which controlled history remains under the retention policy.
6. Diagnose before claiming readiness
For each test, record the source case, arrival, applied effect, current result and unresolved condition:
- A late event: can it reach the correct event period or a visible reconciliation route?
- A duplicate delivery: does the relevant count stay unchanged through retry and restart?
- A correction: does the current view advance without an older replay undoing it?
- A deletion: which downstream representations respond, and what history remains?
- Invalid structure or permissions: is the affected path held without exposing prohibited data?
Use the separate worksheet and key to apply these decisions. The proposed outcomes are test expectations, not claims that a running system has passed.
7. A dated example
Netflix's April 27, 2016 account of its operating Keystone pipeline describes one event infrastructure serving batch and stream processing. Its engineers explain that producers could drop an event after retries to preserve application availability, and that they measured dropped messages. That was an explicit tradeoff for that system. A financial return needs its own acceptance rule: a low-delay path is inadequate if it silently loses a required event. Decide which losses are acceptable, how they are detected, and which events need reconciliation.
8. Bringing the pipeline decision together
The return event needs its business time, stable delivery identity and later correction preserved along the path. Choose a cadence from the service delay it can tolerate, then test late arrivals, retries, corrections and scoped deletion. A low-delay stream becomes useful when its effects remain accurate and traceable through failure and recovery.
Learning Checks
Attempt each answer before expanding the reasoning.
M13-L05-Q01
Why can real-time data still be wrong? Consider the late return, its repeated delivery, and its corrected status before you answer.
Show reasoning
Low delay does not establish correct source meaning, complete events, duplicate handling, compatible structure, or appropriate permissions. A pipeline can deliver the wrong status almost immediately. Freshness is one part of quality. Test what arrives, what is applied, what is held, and what remains unresolved.
M13-L05-Q02
The same identified return event arrives twice, followed by a later correction for the same return. Should the pipeline discard everything after the first arrival? Explain what must stay the same and what must change.
Show reasoning
The duplicate delivery should leave the relevant business effect unchanged. The genuine later correction must still update the identified return under the change-order rule. Treating the return identifier as a reason to discard every later change would freeze an obsolete state. The checks must distinguish repeated delivery from new information about the same case.
Sources
- MS-ETL: Microsoft, Azure Architecture Center, “Extract, transform, and load (ETL).” https://learn.microsoft.com/en-us/azure/architecture/data-guide/relational-data/etl. Linked source metadata: https://github.com/MicrosoftDocs/architecture-center/blob/main/docs/data-guide/relational-data/etl.yml, ms.date 15 September 2025. No immutable article URL verified. Retrieved 29 October 2026.
- FL-MODE: Apache Software Foundation, Apache Flink 1.20 release documentation, page showing v1.20.3, “Execution Mode (Batch/Streaming).” https://nightlies.apache.org/flink/flink-docs-release-1.20/docs/dev/datastream/execution_mode/. Retrieved 29 October 2026.
- FL-TIME: Same organization/version, “Timely Stream Processing.” https://nightlies.apache.org/flink/flink-docs-release-1.20/docs/concepts/time/. Retrieved 29 October 2026.
- PG-CDC: PostgreSQL Global Development Group, PostgreSQL 18 Documentation, §29.1, “Publication,” including Replica Identity. https://www.postgresql.org/docs/18/logical-replication-publication.html. Retrieved 29 October 2026.
- RFC-IDEM: R. Fielding, M. Nottingham and J. Reschke, eds., IETF, RFC 9110, *HTTP Semantics*, §9.2.2, June 2022. https://www.rfc-editor.org/rfc/rfc9110.html#section-9.2.2. Retrieved 29 October 2026.
- Netflix Technology Blog, “Kafka Inside Keystone Pipeline”, published 2016-04-27; event/context: Netflix operating pipeline reported April 2016. https://netflixtechblog.com/kafka-inside-keystone-pipeline-dd5aeabaf6bb (retrieved 2026-10-29). Netflix self-report of 2016 configuration, not current product guarantee or acceptable loss policy for financial events.