SUBSTR

This page describes the SUBSTR function in Lenses SQL.

SUBSTR(expr, startIndexExpr)

Returns a new string that is a substring of this string.

Available in:

Processors
SQL Studio

Sample code:

USE `kafka`;
SELECT 
    SUBSTR(email, 10 , 20),
    email 
FROM users-topic
LIMIT 1;

Output:

{
  "value": {
    "SUBSTR": "aol.com",
    "email": "Jose.Hood@aol.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.