Language

Timestamp Handling

`TIMESTAMP BY` selects event time from a JSON field.

Guide

`TIMESTAMP BY` selects event time from a JSON field.

sql
SELECT value INTO output FROM input TIMESTAMP BY ts

Supported tested timestamp values:

  • Numeric timestamp values.
  • ISO timestamp strings such as `"1970-01-01T00:00:02Z"`.

Invalid timestamp values throw a clear runtime error mentioning `TIMESTAMP BY`:

json
{"ts":"not-a-timestamp","value":1}

When `TIMESTAMP BY` is omitted:

sql
SELECT value INTO output FROM input

ChronusQL uses event arrival time. In CLI file processing, arrival time is assigned by the input reader.