Documentation

spread() function

Flux 0.7.0+

The spread() function outputs the difference between the minimum and maximum values in a specified column. spread() is an aggregate function.

Only uint, int, and float column types can be used. The type of the output column depends on the type of input column:

  • For columns with type uint or int, the output is an int
  • For columns with type float, the output is a float.
spread(column: "_value")

Parameters

column

The column on which to operate. Default is "_value".

tables

Input data. Default is piped-forward data (<-).

Examples

The following example uses data provided by the sampledata package to show how spread() transforms data.

import "sampledata"

sampledata.int()
  |> spread()

View input and output


Upgrade to InfluxDB Cloud or InfluxDB 2.0!

InfluxDB Cloud and InfluxDB OSS 2.0 ready for production.