Search code examples
apache-kafkaapache-kafka-streams

Can we use SQL query in Kafka Stream API?


Can we consume the data from Kafka Stream with filters? From their docs, they claimed that we can apply our logics while consuming the data by using stream API. I can't find any samples regarding that.


Solution

  • Yes, filter is a literal method name in the Streams API DSL and examples are readily available in the Kafka Streams documentation pages.

    If you want to use SQL for filtering, install KsqlDB or use SparkSQL, Flink, etc.