1.4 KiB
1.4 KiB
title | description | menu | weight | related | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|
experimental.group() function | The `experimental.group()` function introduces an `extend` mode to the existing `group()` function. |
|
302 |
|
The experimental.group()
function introduces an extend
mode to the existing
group()
function.
Function type: Transformation
{{% warn %}}
This function will be removed once the proposed extend
mode is sufficiently vetted.
{{% /warn %}}
import "experimental"
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
{{% note %}}
extend
is the only mode available to experimental.group()
.
{{% /note %}}
extend
Appends columns defined in the columns
parameter to all existing
group keys.
Examples
Include the value column in each groups' group key
import "experimental"
from(bucket: "example-bucket")
|> range(start: -1m)
|> experimental.group(columns: ["_value"], mode: "extend")