INDEXOF

This page describes the INDEXOF function in Lenses SQL.

INDEXOF(expr, substringExpr)

Returns the index of a substring in an expression.

Available in:

Processors
SQL Studio

Sample code:

USE `kafka`;
SELECT 
    INDEXOF(email,'@'), 
    email 
FROM users-topic
LIMIT 1;

Output:

{
  "value": {
    "INDEXOF": 9,
    "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.