experimental.group() function

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

The experimental.group() function introduces an extend mode to the existing group() function.

*Function type: Transformation*

This function will be removed once the proposed extend mode is sufficiently vetted.

  1. import "experimental"
  2. experimental.group(columns: ["host", "_measurement"], mode:"extend")

Parameters

columns

List of columns to use in the grouping operation. Defaults to [].

*Data type: Array of strings*

mode

The mode used to group columns.

*Data type: String*

extend is the only mode available to experimental.group().

extend

Appends columns defined in the columns parameter to all existing group keys.

Examples

Include the value column in each groups’ group key
  1. import "experimental"
  2. from(bucket: "example-bucket")
  3. |> range(start: -1m)
  4. |> experimental.group(columns: ["_value"], mode: "extend")

Related articles