SECOND

This page describes the SECOND function in Lenses SQL.

SECOND(dataExpr)

Extracts the second component of an expression that is of type timestamp.

Available in:

ProcessorsSQL Studio

Sample code:

USE `kafka`;
SELECT 
    SECOND(_meta.timestamp), 
    _meta.timestamp 
FROM nyc-yellow-taxi-trip
LIMIT 1;

Output:

{
  "value": {
    "SECOND": 45,
    "timestamp": "2023-11-28T20:28:45.41Z"
  }
}

Last updated

Logo

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