STARTSWITH

This page describes the STARTSWITH function in Lenses SQL.

STARTSWITH(exprSource, exprTarget)

Returns true if an expression starts with the given substring.

Available in:

ProcessorsSQL Studio

Sample code:

USE `kafka`;
SELECT 
    STARTSWITH(email, 'Jo'), 
    email 
FROM users-topic
LIMIT 3;

Output:

{
  "value": {
    "STARTSWITH": true,
    "email": "Jose.Hood@aol.com"
  }
}
{
  "value": {
    "STARTSWITH": true,
    "email": "Joshua.Hernandez@aol.com"
  }
}
{
  "value": {
    "STARTSWITH": false,
    "email": "Kathleen.Williams@outlook.com"
  }
}

Last updated

Logo

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