Warning! This page documents an earlier version of Flux, which is no longer actively developed. Flux v0.50 is the most recent stable version of Flux.
The duplicate()
function duplicates a specified column in a table.
Function type: Transformation
Output data type: Object
duplicate(column: "column-name", as: "duplicate-name")
Parameters
column
The column to duplicate.
Data type: String
as
The name assigned to the duplicate column.
Data type: String
Examples
from(bucket: "telegraf/autogen")
|> range(start:-5m)
|> filter(fn: (r) => r._measurement == "cpu")
|> duplicate(column: "host", as: "server")