ENDSWITH

This page describes the ENDSWITH function in Lenses SQL.

ENDSWITH(sourceExpr, targetExpr)

Returns true if an expression ends with the given substring.

Available in:

ProcessorsSQL Studio

Sample code:

USE `kafka`;
SELECT 
    ENDSWITH(status, 'unverified'), 
    status 
FROM users-topic
LIMIT 2;

Output:

{
  "value": {
    "ENDSWITH": false,
    "status": "verified"
  }
}
{
  "value": {
    "ENDSWITH": true,
    "status": "unverified"
  }
}

Last updated

Logo

2024 © Lenses.io Ltd. Apache, Apache Kafka, Kafka and associated open source project names are trademarks of the Apache Software Foundation.