fromRows() function

Warning! This page documents an earlier version of Flux, which is no longer actively developed. Flux v0.65 is the most recent stable version of Flux.

The fromRows() function is a special application of the pivot() function that automatically aligns fields within each measurement that have the same timestamp.

Function type: Input
Output data type: Object

fromRows(bucket: "bucket-name")

// OR

fromRows(bucketID: "0261d8287f4d6000")



The name of the bucket to query.

Data type: String

Function definition

fromRows = (bucket) =>
    |> pivot(rowKey:["_time"], columnKey: ["_field"], valueColumn: "_value")


fromRows(bucket: "telegraf/autogen")
  |> range(start: 2018-05-22T19:53:26Z)
fromRows(bucketID: "0261d8287f4d6000")
  |> range(start: 2018-05-22T19:53:26Z)