liveBook · Manning

Flink

As explained in Architecting an Apache Iceberg Lakehouse

Apache Flink is an open-source distributed processing framework for stateful batch and stream computations.

Apache Flink is a high-performance, stateful stream-processing engine for building low-latency, event-driven ingestion pipelines into Apache Iceberg tables. It supports continuous data arrival, incremental commits, and both streaming and batch writes. section 6.4.2 section 2.7.2

Flink is most useful when ingestion requires:

  • Exactly-once delivery through coordinated checkpointing and Iceberg atomic snapshots. section 6.4.2
  • Event-time processing for out-of-order and late-arriving events, including watermarking and windowed aggregations. section 6.4.2 section 6.5.1
  • In-flight filtering, enrichment, multistream joins, masking, deduplication, and field derivation through SQL or the DataStream API. section 6.4.2 section 6.5.3
  • High-volume Kafka ingestion with checkpointing, partitioning, batching, and controlled commits. section 6.5.2

Streaming Kafka events into Iceberg

Define a Kafka source with an event-time watermark, configure an Iceberg sink, and insert the source stream into the sink. A typical design commits every few seconds to meet freshness targets while avoiding excessive snapshot and metadata growth. section 6.5.1

Flink trades operational simplicity for control. Continuous pipelines require tuning of checkpointing, memory, file sizes, partitioning, commit frequency, schema validation, compaction, and monitoring. Complex stateful transformations also demand stronger testing and operational maturity. section 6.5.1 section 6.5.3

CREATE TABLE source_kafka (
  id STRING,
  event_time TIMESTAMP(3),
  data STRING,
  WATERMARK FOR event_time AS event_time - INTERVAL '5' SECOND
) WITH (
  'connector' = 'kafka',
  'topic' = 'events',
  'properties.bootstrap.servers' = 'broker:9092',
  'format' = 'json'
); #1
CREATE TABLE sink_iceberg (
  id STRING,
  event_time TIMESTAMP(3),
  data STRING
) WITH (
  'connector' = 'iceberg',
  'catalog-name' = 'my_catalog',
  'catalog-type' = 'hadoop',
  'warehouse' = 's3a://my-bucket/warehouse',
  'format-version' = '2'
); #2
INSERT INTO sink_iceberg
SELECT * FROM source_kafka; #3

Inspect the executable SQL pattern for defining a Kafka source, applying event-time watermarks, configuring an Iceberg sink, and inserting the stream. section 6.4.2

How Architecting an Apache Iceberg Lakehouse covers it

How deep it goes
Explains APIs, checkpoints, event time, transformations, and operational tradeoffs without descending into engine internals.
Examples
Uses Kafka-to-Iceberg SQL and DataStream examples alongside fintech, media, healthcare, and logistics ingestion scenarios.
What it assumes
Assumes familiarity with ingestion, streaming, Kafka, and Iceberg tables while demonstrating source, sink, and transformation patterns.
What you can do after
Build real-time Kafka-to-Iceberg pipelines with transformations, checkpoints, event-time handling, and controlled commits.
How it connects
Connects Kafka, Apache Iceberg, checkpointing, event-time processing, schema evolution, compaction, and Apache Spark.

Also explained in

Compare how 2 books explain Flink →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Architecting an Apache Iceberg Lakehouse. The section links point to the parts of the book it draws on.