Click to copy

• Reviewed for ksqlDB 0.29

What is the Difference between KSQL and ksqlDB

In short, ksqlDB is the successor of KSQL.

Confluent launched KSQL back in Aug 2017, as their first SQL-based streaming solution. Later in Nov 2019, Confluent introduced ksqlDB as its successor, featuring a set of syntax improvements that were not backward compatible. On top of this, the new ksqlDB can now manage Kafka Connect clusters.

Breaking changes in the SQL language

Statements written for KSQL may not run in ksqlDB with the same behavior. With the release of ksqlDB, they introduced non-backward compatible changes to the SQL language.

One of these changes is the EMIT CHANGES modifier, which is used to create streaming queries. In KSQL, all queries were streaming queries but now we need this modifier if we want them to have the same behavior. This type of query is a push query.

You may be asking yourself, what happens if you query without the EMIT CHANGES modifier — your query will become a pull query instead, which returns a single result and halts, so be careful when you migrate your old code.

ksqlDB adds support for Kafka Connect

A major upside of ksqlDB over KSQL is the ability to launch and manage Apache Kafka connectors using SQL.

How to identify what I am using

If you use the managed Confluent service as of today, you are using ksqlDB.

For self-managed clusters, connect to your cluster using a ksqlDB CLI and look for the greeting message. You should see a big banner telling you what you are using. Below is an example of the ksqlDB banner:

========================================
=     _              _ ____  ____      =
=    | | _____  __ _| |  _ \| __ )     =
=    | |/ / __|/ _` | | | | |  _ \     =
=    |   <\__ \ (_| | | |_| | |_) |    =
=    |_|\_\___/\__, |_|____/|____/     =
=                 |_|                  =
=      The Database purpose-built      =
=      for stream processing apps      =
========================================
Discover what readers are saying
topictale
Get easy to digest how-tos on ksqlDB
Sign up
Please read our Privacy Policy to understand how we protect and manage your data.
You may also like