CENTER

This page describes the CENTER function in Lenses SQL.

CENTER(target,size,padExpr)

Centers a String in a larger String of size N.

Available in:

Processors
SQL Studio

Sample code:

USE `kafka`;
SELECT 
    CENTER(product_name, 30, ' '), 
    product_name 
FROM products-topic
LIMIT 1;

Output:

{
  "value": {
    "CENTER": "  Soft Shirt   ",
    "product_name": "Soft Shirt"
  }
}

Last updated

Logo

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