Learn Flink SQL to turn Kafka streams into live results: windows, event time, watermarks, state, and checkpoints, at a working level.
It is 2:14 AM, and a customer pays for an acme-shop order with UPI.
Flink offers three ways to write jobs: the DataStream API (Java, Scala, or Python, full control), the Table API, and Flink SQL.
Every Flink SQL streaming job has the same three steps: declare a source table, declare a sink table, then run a query that reads one and writes the...
A stream never ends, so "give me the total" has no meaning on its own: total of what, up to when?
Every event has two timestamps. Event time is when it actually happened. Processing time is when Flink happens to see it.
This scenario happens in production far more often than a missing watermark clause. The Symptom A job with a correct watermark ran fine for weeks.
It is 2:14 AM, and a customer pays for an acme-shop order with UPI.
Flink offers three ways to write jobs: the DataStream API (Java, Scala, or Python, full control), the Table API, and...
Every Flink SQL streaming job has the same three steps: declare a source table, declare a sink table, then run a query...
A stream never ends, so "give me the total" has no meaning on its own: total of what, up to when?
Every event has two timestamps. Event time is when it actually happened.
This scenario happens in production far more often than a missing watermark clause.
Every windowed total you have written implies Flink is remembering something between events.
Your job has run for six hours, holding partial totals. The machine crashes.
Parallelism is how many parallel subtasks Flink runs for part of a job.
These are awareness topics. You should know the words, and not write them from scratch yet.
You now have three tools that look alike but solve different problems.
You will run Kafka and Flink locally with Docker, stream acme-shop order events, and watch a 30-second window close...
Quick Reference Common Mistakes Starting with the DataStream API.
You built a live revenue-per-category job for acme-shop with Flink SQL, saw a window close only when the watermark...
Roles that use the skills in this module.
Data Engineer
Platform Engineer
Not a software engineer sheet. Every problem comes from real DevOps, SRE, Platform and Cloud interviews, from your first script to a system you build yourself.
Open the Coding SheetKafka stores and delivers streams of events reliably. Flink reads those events and computes something over them, such as totals per window or alerts. Kafka moves the data, and Flink does the thinking.
Start with Flink SQL. Most streaming ETL jobs, such as filters, windowed aggregations, and simple joins, can be written in SQL, which is easier to read and maintain. Use the DataStream API only for custom logic that SQL cannot express.
A window emits only when the watermark passes its end time, and the watermark advances only when Flink sees newer event times. A missing watermark, no newer events, or an idle Kafka partition are the usual causes.
Only if the business needs results within seconds. Spark is simpler for bounded batch jobs, and many teams run both. Choose Flink when freshness is a real requirement, not because streaming sounds more impressive.