---
title: experimental.set() function
description: experimental.set() sets multiple static column values on all records.
url: https://docs.influxdata.com/flux/v0/stdlib/experimental/set/
estimated_tokens: 1158
product: Flux
version: v0
---

# experimental.set() function

-   Flux 0.40.0+
-   View InfluxDB support

`experimental.set()` is [subject to change at any time](/flux/v0/stdlib/experimental/#experimental-packages-are-subject-to-change).

`experimental.set()` sets multiple static column values on all records.

If a column already exists, the function updates the existing value. If a column does not exist, the function adds it with the specified value.

##### Function type signature

```js
(<-tables: stream[B], o: A) => stream[C] where A: Record, B: Record, C: Record
```

For more information, see [Function type signatures](/flux/v0/function-type-signatures/).

## Parameters

### o

(Required) Record that defines the columns and values to set.

The key of each key-value pair defines the column name. The value of each key-value pair defines the column value.

### tables

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

## Examples

### Set values for multiple columns

```js
import "experimental"

data
    |> experimental.set(o: {_field: "temperature", unit: "°F", location: "San Francisco"})
```

[](#view-example-input-and-output)

View example input and output

#### Input data

| _time | _field | _value |
| --- | --- | --- |
| 2019-09-16T12:00:00Z | temp | 71.2 |
| 2019-09-17T12:00:00Z | temp | 68.4 |
| 2019-09-18T12:00:00Z | temp | 70.8 |

#### Output data

| _time | _field | _value | unit | location |
| --- | --- | --- | --- | --- |
| 2019-09-16T12:00:00Z | temperature | 71.2 | °F | San Francisco |
| 2019-09-17T12:00:00Z | temperature | 68.4 | °F | San Francisco |
| 2019-09-18T12:00:00Z | temperature | 70.8 | °F | San Francisco |

#### Related

-   [set() function](/flux/v0/stdlib/universe/set/)

[transformations](/flux/v0/tags/transformations/)
