Structured Streaming
Basic Concepts


Types of time windows

Handling Late Data and Watermarking

์ฐธ๊ณ ์๋ฃ
Last updated




Last updated
import spark.implicits._
val words = ... // streaming DataFrame of schema { timestamp: Timestamp, word: String }
// Group the data by window and word and compute the count of each group
val windowedCounts = words
.withWatermark("timestamp", "10 minutes")
.groupBy(
window($"timestamp", "10 minutes", "5 minutes"),
$"word")
.count()