Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

COALESCE

This page describes the COALESCE function in Lenses SQL.

COALESCE(value, prevValue)

Returns the first non-null expression in the expression list.

Available in:

Processors
SQL Studio

✓

✓

Sample code:

USE `kafka`;
SELECT 
    COALESCE(modified_at, "not updated") AS modified_at 
FROM users-events
WHERE modified_at IS NULL
LIMIT 1;

Output:

{
  "value": {
    "modified_at": "not updated"
  }
}

In case you want to know more about nullability scenarios, see here.

Last updated

Was this helpful?