LPAD

This page describes the LPAD function in Lenses SQL.

LPAD(strExpr, lengthExpr, padExpr)

Prepends the value of padExpr to the value of strExpr until the total length is lengthExpr.

Available in:

ProcessorsSQL Studio

Sample code:

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

Output:

{
  "value": {
    "LPAD": "                                 Jose.Hood@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.