distinct() function

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

The distinct() function returns the unique values for a given column.

Function type: Selector
Output data type: Object

distinct(column: "host")

Parameters

column

Column on which to track unique values.

Data type: string

Examples

from(bucket: "telegraf/autogen")
	|> range(start: -5m)
	|> filter(fn: (r) => r._measurement == "cpu")
	|> distinct(column: "host")

DISTINCT()