Glossary Entry

What is Streaming Ingestion?

Streaming ingestion loads data continuously as it is generated, via a broker like Kafka and a processor like Flink, into sinks such as Apache Iceberg tables.

Written by Alex Merced

What is Streaming Ingestion?

Introduction to Streaming Ingestion

As businesses undergo digital transformation, both the rate at which data is generated and the speed at which it must be analyzed have increased. IoT sensors can emit readings many times per second. E-commerce platforms track user clicks as they happen. Credit card networks must detect fraud the moment a transaction occurs.

Relying on traditional batch processing (loading data into a data warehouse once every 24 hours or even once an hour) is not enough for these cases. To act on time-sensitive data, organizations adopt Streaming Ingestion.

Streaming ingestion is the continuous process of capturing, processing, and loading data into a storage system or analytical engine shortly after it is generated. Instead of working with large, bounded files, streaming pipelines work with unbounded sequences of events.

The Streaming Architecture

A typical streaming ingestion pipeline consists of three primary components: the Message Broker, the Stream Processing Engine, and the Sink (the final storage destination).

1. The Message Broker (The Nervous System)

When thousands of devices or microservices are emitting events concurrently, you need a scalable, fault-tolerant system to receive and buffer them. Apache Kafka is the most widely used option for this role.

Kafka acts as a durable, distributed commit log. Producers (e.g., a web server tracking clicks) write events to Kafka “topics”. Kafka stores these events on disk and replicates them across brokers, so data is retained even if the downstream ingestion systems crash. It also absorbs backpressure: during large spikes in traffic (e.g., Black Friday traffic) it buffers the data until the processing engines catch up.

2. The Stream Processing Engine (The Muscle)

Once data is safely buffered in Kafka, it must be read, transformed, and prepared for storage. This is the domain of engines like Apache Flink or Spark Structured Streaming.

These engines operate continuously. As a new event hits the Kafka topic, Flink immediately pulls it, executes logic (like filtering out malformed JSON, joining the event with a static lookup table, or aggregating clicks over a 5-minute sliding window), and prepares the output.

Crucially, modern streaming engines manage State and Exactly-Once Semantics. If a server node crashes mid-stream, Flink can recover its state from a checkpoint and, combined with replayable sources and transactional sinks, provide exactly-once results: each event affects the output once, with none lost or double counted.

3. The Sink (The Data Lakehouse)

Historically, the final destination for streaming data was a specialized real-time database (like Apache Druid or Elasticsearch). Traditional data lakes (based on raw Parquet files) were poor sinks for streaming because continuously appending small amounts of data produced many tiny files, which degraded query performance (the “small file problem”).

The advent of Apache Iceberg changed this. Iceberg’s transactional commits make it a practical streaming sink. When Flink writes a continuous stream into an Iceberg table, Iceberg manages the commits transactionally. Instead of rewriting files, Iceberg safely appends new Parquet files and updates its metadata tree without blocking readers. To address the small file problem, compaction jobs (for example, Iceberg’s rewrite_data_files procedure) run in the background and merge the small streaming files into larger, read-optimized files while ingestion continues.

Complexities in Streaming Ingestion

Streaming ingestion is inherently more complex than batch processing due to the unpredictable nature of real-world networks.

Event Time vs. Processing Time

Ideally, an event generated at 12:00:00 is processed at 12:00:01. In reality, a mobile phone might lose cellular connection, and an event generated at 12:00:00 might not arrive at the Kafka broker until 12:45:00.

Streaming pipelines must distinguish between:

  • Event Time: The time the event actually occurred on the device.
  • Processing Time: The time the ingestion engine received it.

Engines like Flink use concepts like Watermarks to handle late-arriving data. A watermark is a signal that tells the system: “I do not expect any more events with an Event Time older than X.” This allows the pipeline to confidently close analytical windows and output results, while defining specific logic for how to handle data that arrives exceptionally late.

Schema Evolution

When streaming data continuously, the source application will eventually change its schema (e.g., adding a new field for user_location). If the ingestion pipeline is rigidly typed, it can fail. A resilient streaming architecture utilizes a Schema Registry (like Confluent Schema Registry). The streaming engine consults the registry, detects the schema change, and, when the sink supports schema evolution, applies it to the Iceberg table so the stream keeps flowing.

Conclusion

Streaming ingestion is how organizations get data into analytics systems in near real time. By combining the durability of Apache Kafka, the continuous processing power of Apache Flink, and the transactional reliability of the Apache Iceberg lakehouse, data teams can give business users fresh, actionable data within seconds to minutes of an event. While it introduces complexities regarding late data and state management, the architectural patterns for these challenges are well established, making near real-time data lakes practical.

Learn More

To learn more about the Data Lakehouse, read The Lakehouse Built for Everyone by Alex Merced. You can find this and other books by Alex Merced at books.alexmerced.com.

Work with Alex