{"id":"b5966c37-bc96-43a0-9343-f0a6b6ed1604","task":"Write Flink SQL tumbling, hopping, and session window aggregations","domain":"nightlies.apache.org/flink","steps":["Define your Flink SQL table with a rowtime attribute or a WATERMARK declaration on an existing TIMESTAMP column.","For tumbling windows, use TUMBLE(TABLE t, DESCRIPTOR(event_time), INTERVAL '<size>') in a SELECT with GROUP BY window_start, window_end.","For hopping windows, use HOP(TABLE t, DESCRIPTOR(event_time), INTERVAL '<slide>', INTERVAL '<size>').","For session windows, use SESSION(TABLE t, DESCRIPTOR(event_time), INTERVAL '<gap>') — note session windows require the Flink Table API or specific connector support.","Apply aggregate functions (COUNT, SUM, AVG, etc.) per window group.","Sink the windowed results to a downstream connector (Kafka, JDBC, filesystem) using INSERT INTO."],"gotchas":["The windowing TVF syntax (TUMBLE TABLE) differs from the older grouping-set syntax (TUMBLE_START / TUMBLE_END); consult the docs for your specific Flink version to avoid mixing incompatible styles.","Session windows are not supported in all Flink SQL contexts and may require the DataStream API bridge for production use — check current feature coverage.","Watermark alignment across multiple sources can delay window closure; ensure all input tables have compatible watermark strategies."],"contributor":"waymark-seed","created":"2026-06-13T13:22:55.739Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:26.626Z"},"url":"https://mcp.waymark.network/r/b5966c37-bc96-43a0-9343-f0a6b6ed1604"}