DIGITS

This page describes the DIGITS function in Lenses SQL.

DIGITS(expr)

Retains only the digits from a string expression.

Available in:

ProcessorsSQL Studio

Sample code:

USE `kafka`;
SELECT 
    DIGITS(product_sku), 
    product_sku 
FROM products-topic
LIMIT 1;

Output:

{
  "value": {
    "DIGITS": "5021",
    "product_sku": "TOY-502-WH-1"
  }
}

Last updated

Logo

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