Click to copy

• Reviewed for ksqlDB 0.29

How to Use Operators in ksqlDB

In ksqlDB, operators are functions built into the language — they provide many common operations you will need:

Boolean

  • AND, OR and NOT
  • =, !=, <, <=, >, >=
  • string LIKE pattern
  • string NOT LIKE pattern
  • value IS NULL
  • value IS NOT NULL

Arithmetic

  • +, -, *, /, %

String

  • +, ||: to concatenate two strings together

Date and time

  • timestamp AT timezone
  • BETWEEN time_field AND time_field
  • NOT BETWEEN time_field AND time_field

Array

  • []: get the element at the index as of [1]

Struct

  • ->: get the field from struct as of struct->field.

How to use them

Below are some common use cases on when you will need them:

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