CHOP

This page describes the CHOP function in Lenses SQL.

CHOP(expr)

Returns the last character from an expression of type string.

Available in:

ProcessorsSQL Studio

Sample code:

USE `kafka`;
SELECT 
    CHOP(last_name), 
    last_name 
FROM users-topic
LIMIT 1;

Output:

{
  "value": {
    "CHOP": "Hoo",
    "last_name": "Hood"
  }
}

Last updated

Logo

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