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"

geo.toRows(
  correlationKey: ["_time"]
)

Parameters

correlationKey

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

Data type: Array of strings

Examples

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"]) =>
  tables
    |> 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