Documentation

experimental.unique() function

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

The experimental.unique() function returns all records containing unique values in the _value column. null is considered a unique value.

Function type: Selector

import "experimental"

experimental.unique()

Output schema

experimental.unique() outputs a single table for each input table and does the following:

  • Outputs a single record for each unique value.
  • Leaves group keys, columns, and values unmodified.

Empty tables

experimental.unique() drops empty tables.

Parameters

tables

Input data. Default is pipe-forwarded data.

Data type: String

Examples

import "experimental"

data
 |> experimental.unique()
Input data
_time_field_value
2021-01-01T00:00:00Zverv1
2021-01-01T00:01:00Zverv1
2021-01-01T00:02:00Zverv2
2021-01-01T00:03:00Zver
2021-01-01T00:04:00Zverv3
2021-01-01T00:05:00Zverv3
Output data
_time_field_value
2021-01-01T00:00:00Zverv1
2021-01-01T00:02:00Zverv2
2021-01-01T00:03:00Zver
2021-01-01T00:04:00Zverv3

Cloud or OSS?

InfluxDB OSS 2.0 now generally available!

InfluxDB OSS 2.0 is now generally available and ready for production use. See the InfluxDB OSS 2.0 release notes.

For information about upgrading to InfluxDB OSS 2.0, see: