How can we aggregate real-time transaction counts into non-overlapping, contiguous 5-minute time windows?
groupBy(window('event_timestamp', '5 minutes'), 'store_id') groups events into fixed, non-overlapping temporal buckets.
Real-time store traffic monitoring, infrastructure error rate tracking, and 5-minute financial volume metrics.
df_tumbling = df_watermarked.groupBy(window(col("event_timestamp"), "5 minutes"), col("store_id")).agg(sum("amount").alias("window_sales"), count("transaction_id").alias("tx_count"))Practice typing production-grade PySpark code for Tumbling Time Window Aggregations.