docs-v2/content/flux/v0.x/stdlib/experimental/unpivot.md

1.9 KiB

title description menu weight
experimental.unpivot() function `experimental.unpivot()` removes the `_time` column and any other column not in the group key and outputs a new table with `_field` and `_value` columns pairs. The output stream retains the group key and all group key columns of the input stream. Specialized to transform the pivoted output from `iox.from()` into the unpivoted format.
flux_0_x_ref
name parent identifier
experimental.unpivot experimental experimental/unpivot
101

experimental.unpivot() removes the _time column and any other column not in the group key and outputs a new table with _field and _value columns pairs. The output stream retains the group key and all group key columns of the input stream. Specialized to transform the pivoted output from iox.from() into the unpivoted format.

Function type signature
(<-tables: stream[{A with _time: time}]) => stream[{B with _value: C, _field: string}] where A: Record, B: Record

{{% caption %}}For more information, see Function type signatures.{{% /caption %}}

Parameters

tables

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