Understanding KSQL

How to build a streaming application with KSQL ? Syntax is very similar to SQL.

KSQL Basics - Why ?

Why KSQL ?

KSQL Basics - How ?

Everything starts with the Kafka cluster since it is the core of the streaming platform.

From CLI instruction to query executed by Kafka Streams

KSQL

CREATE STREAM streamName AS

SELECT col1, col2, col3

FROM source

WHERE type = '…'

Kafka Streams

.to(“streamName“)

.mapValues(source → source.getCol1() + “,“ + source.getCol2() + “,“ + source.getCol3())

.stream(“source“)

.filter(source → source.getType().equals(“..“))

KSQL Basics - When ?

  1. Streaming Operations : Data analytics, Monitoring, IOT, etc.

  2. Viewing Data : Show the content of a topic.

  3. Manipulating data : enhance info stored in a topic.