TAKELEFT

This page describes the TAKELEFT function in Lenses SQL.

TAKELEFT(expr, lengthExpr)

Returns the leftmost ’length’ characters from a string expression.

Available in:

Processors
SQL Studio

Sample code:

USE `kafka`;
SELECT 
    TAKELEFT(first_name, 3), 
    first_name 
FROM users-topic
LIMIT 1;

Output:

{
  "value": {
    "TAKELEFT": "Jos",
    "first_name": "Jose"
  }
}

Last updated

Logo

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