DROPRIGHT

This page describes the DROPRIGHT function in Lenses SQL.

DROPRIGHT(expr, lengthExpr)

Removes the rightmost ’length’ characters from a string expression.

Available in:

Sample code:

USE `kafka`;
SELECT 
    DROPRIGHT(password_hash, 50),
    password_hash 
FROM users-topic
LIMIT 1;

Output:

{
  "value": {
    "DROPRIGHT": "f216651c7341b5",
    "password_hash": "f216651c7341b50cb69649c7bec2b11641f7af6ac0b35a046e1b1b852b84c903"
  }
}

Last updated

Logo

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