cinep10

Data Pipeline — Lineage, Contract, and Stream/Batch Integration Issues (v0.2)

Overview

In v0.2, the data pipeline evolved from a batch-centric architecture (v0.1) to a hybrid system incorporating Kafka-based stream processing.

While this enabled real-time data ingestion and anomaly detection, a set of structural issues emerged that were not isolated bugs, but systemic problems across the pipeline.

These issues can be grouped into four key areas:

This document analyzes these issues from an engineering perspective, including observed symptoms, technical causes, interim fixes, and design directions.


1. Source Lineage and Snapshot Management

Symptoms

Technical Issue

Why It Happened in v0.2

Interim Fix in v0.2

→ Not a fundamental solution

Direction for v0.3

Introduce explicit source snapshot management:


raw_log (dt=2025-04-01, version=1)
raw_log (dt=2025-04-01, version=2)


2. Stream Path Fragmentation

Symptoms

Stream testing was performed through multiple paths:


(1) Kafka-based stream path
(2) DB-based post-processing path

Technical Issue

Why It Happened in v0.2

Interim Fix in v0.2

→ No consistent baseline

Direction for v0.3

Standardize the stream runtime path:


event_log_raw → Kafka → consumer → stg_event_stream


3. Scenario Injection Strategy

Symptoms

Technical Issue

Why It Happened in v0.2

Interim Fix in v0.2

Scenario injection applied after canonicalization:


event_log_raw → (DB-level injection) → downstream

Direction for v0.3

Introduce dual injection strategies:


(1) Source-stage injection
(2) Post-load injection


4. Canonicalization and Branching Structure

Symptoms

Technical Issue

Direction for v0.3

Enforce canonical processing before branching:


raw → canonical → branch (batch / stream)


5. Contract Standardization Issues

Symptoms

Technical Issue

Direction for v0.3

Standardize:


Key Takeaway

The issues in v0.2 were not isolated bugs, but structural problems in lineage, processing paths, injection strategy, and contract design.


One-line Summary

v0.2 introduced stream processing, but inconsistencies in lineage, contract, and runtime paths led to pipeline integrity issues.