PARSE_TIMESTAMP_MILLIS

This page describes the PARSE_TIMESTAMP_MILLIS function in Lenses SQL.

PARSE_TIMESTAMP_MILLIS(string, input_pattern)

Builds a timestamp-millis value given a datetime string representation and a date time pattern.

Available in:

ProcessorsSQL Studio

Sample code:

USE `kafka`;
SELECT 
    PARSE_TIMESTAMP_MILLIS(tpep_pickup_datetime, 'yyyy-MM-dd HH:mm:ss'), 
    tpep_pickup_datetime 
FROM nyc-yellow-taxi-trip
LIMIT 1;

Output:

{
  "value": {
    "PARSE_TIMESTAMP_MILLIS": "2016-01-01T00:00:02Z",
    "tpep_pickup_datetime": "2016-01-01 00:00:02"
  }
}

Last updated

Logo

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