PARSE_TIMESTAMP_MICROS

This page describes the PARSE_TIMESTAMP_MICROS function in Lenses SQL.

PARSE_TIMESTAMP_MICROS(string, input_pattern)

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

Available in:

ProcessorsSQL Studio

Sample code:

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

Output:

{
  "value": {
    "PARSE_TIMESTAMP_MICROS": "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.