Windows transformations are stateful transformations as information is accumulated per window
A window is a subset of a Stream
Event time is used for windowing in structure streaming
Types of Windows
Tumbling Window
Fixed Size window. No overlapping between windows. Amount of data in window varies
Sliding Window
Fixed size. Overlap between windows. Amount of data in window varies
Global Window
All data in stream in one window
Time
Event Time
The data at which the event occurs at the source
Ingestion Time
The time at which the data enters Spark from a source. Cannot handle out of order events (use watermark)
Processing Time
Time required by the system to process the data