duplicate() function

Warning! This page documents an earlier version of Flux, which is no longer actively developed. Flux v0.65 is the most recent stable version of Flux.

The duplicate() function duplicates a specified column in a table. If the specified column is part of the group key, it will be duplicated, but will not be part of the output table’s group key.

Function type: Transformation
Output data type: Object

duplicate(column: "column-name", as: "duplicate-name")



The column to duplicate.

Data type: String


The name assigned to the duplicate column.

Data type: String

If the as column already exists, this function will overwrite the existing values.


from(bucket: "telegraf/autogen")
	|> range(start:-5m)
	|> filter(fn: (r) => r._measurement == "cpu")
	|> duplicate(column: "host", as: "server")