DE Mastery GitHub

Apache Flink · FLK-09

Streaming patterns — dedup, top-N, split/merge, MATCH_RECOGNIZE, OVER

From your world. the recurring SQL shapes you already write (QUALIFY row_number dedup, window functions), now as streaming queries whose output is a changelog

Practice quiz with instant feedback. For a scored run that counts toward your local progress, use uv run de quiz FLK-09.

1A deduplication query uses ROW_NUMBER() OVER (PARTITION BY k ORDER BY ts) WHERE rn = 1 with an ascending ORDER BY. What kind of changelog does it produce?
2You change the dedup ORDER BY to DESC to keep the LAST row per key. How does the changelog change?
3A streaming Top-N (ROW_NUMBER() OVER (... ORDER BY v DESC) WHERE rn <= 3) writes to a Kafka topic. Which sink is correct?
4Why prefer UNION ALL over UNION when merging two event streams in Flink SQL?
5In MATCH_RECOGNIZE, what must the ORDER BY clause reference?
6How does an OVER aggregation differ from a GROUP BY aggregation in Flink SQL?
7Which of these Flink SQL queries are APPEND-ONLY (emit only +I)? Select all that apply. (select all that apply)
8A dedup-keep-first query over orders emits id=42 once. Then the same id=42 arrives again. What does the query emit for the duplicate?