Click to copy

• Reviewed for ksqlDB 0.29

How to Map or Transform Elements in Array in ksqlDB

Use the TRANSFORM function to apply a particular transformation logic to each of the values in an array .

SELECT 
  TRANSFORM(measurements, x => x > 5.6) AS is_dangerous
FROM earthquake;

For reference, the earthquake stream was created with the following statement:

CREATE STREAM earthquake (
  measurements ARRAY<DOUBLE>,
) WITH (...)
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