How to return timestamps in unix timestamp format

Hi,

I’m trying to query and get the timestamps back in unix time format, i.e. NOT RFC3339. This is for performance reasons - parsing the time strings is too expensive for our situation.

I note that the default in the CLI is unix format.

How can I achieve this via the API please?

Many thanks!

@quantnik You can use map() and int()/uint() to convert all the timestamps in your _time column to integers (nanosecond timestamps):

data
  |> map(fn: (r) => ({ r with _time: int(v: r._time)}))

There some more info in the Manipulate timestamps with Flux guide.