geo.toRows() function

The geo.toRows() function is experimental and subject to change at any time. By using this function, you accept the risks of experimental functions.

The geo.toRows() function pivots data into row-wise sets base on time or other correlation columns. For geo-temporal datasets, output rows include lat and lon columns required by many Geo package functions.

Function type: Transformation

import "experimental/geo"

  correlationKey: ["_time"]



List of columns used to uniquely identify a row for output. Default is ["_time"].

Data type: Array of strings


import "experimental/geo"

from(bucket: "db/rp")
  |> range(start: -1h)
  |> filter(fn: (r) => r._measurement == "example-measurement")
  |> geo.toRows()

Function definition

toRows = (tables=<-, correlationKey=["_time"]) =>
    |> pivot(
      rowKey: correlationKey,
      columnKey: ["_field"],
      valueColumn: "_value"

This documentation is open source. See a typo? Please, open an issue.

Need help getting up and running? Get Support