docs-v2/content/v2.0/reference/flux/functions/built-in/transformations/set.md

878 B

title description aliases menu weight
set() function The `set()` function assigns a static value to each record in the input table.
/v2.0/reference/flux/functions/transformations/set
v2_0_ref
name parent
set built-in-transformations
401

The set() function assigns a static value to each record in the input table. The key may modify an existing column or add a new column to the tables. If the modified column is part of the group key, the output tables are regrouped as needed.

Function type: Transformation
Output data type: Object

set(key: "myKey",value: "myValue")

Parameters

key

The label of the column to modify or set.

Data type: String

value

The string value to set.

Data type: String

Examples

from(bucket: "example-bucket")
  |> set(key: "host", value: "prod-node-1")