← Apache Spark learning path
Apache Spark · Module 7 of 10

Structured Streaming

Process real-time data with Spark.

📖 Key ideas

  1. Structured Streaming treats a stream as an unbounded table.
  2. Sources: Kafka, files, sockets.
  3. Same DataFrame API as batch.
  4. Output modes: append, update, complete.
  5. Checkpoints give fault tolerance; watermarks handle late data.
💡 Real-life example: Structured Streaming is a table that keeps growing row by row, and your query keeps updating.
Unbounded tableStream modelled as growing table
CheckpointSaved progress for recovery
WatermarkLimit for late data
Micro-batchSmall batch processed repeatedly