---
title: table.fill() function
description: table.fill() adds a single row to empty tables in a stream of tables.
url: https://docs.influxdata.com/flux/v0/stdlib/experimental/table/fill/
estimated_tokens: 1248
product: Flux
version: v0
---

# table.fill() function

-   Flux 0.115.0+
-   View InfluxDB support

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

`table.fill()` adds a single row to empty tables in a stream of tables.

Columns that are in the group key are filled with the column value defined in the group key. Columns not in the group key are filled with a null value.

##### Function type signature

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

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

## Parameters

### tables

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

## Examples

### Fill empty tables

```js
import "experimental/table"
import "sampledata"

data =
    sampledata.int()
        |> filter(fn: (r) => r.tag != "t2", onEmpty: "keep")

data
    |> table.fill()
```

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

View example input and output

#### Input data

| _time | _value | *tag |
| --- | --- | --- |
| 2021-01-01T00:00:00Z | -2 | t1 |
| 2021-01-01T00:00:10Z | 10 | t1 |
| 2021-01-01T00:00:20Z | 7 | t1 |
| 2021-01-01T00:00:30Z | 17 | t1 |
| 2021-01-01T00:00:40Z | 15 | t1 |
| 2021-01-01T00:00:50Z | 4 | t1 |

| _time | _value | *tag |
| --- | --- | --- |

#### Output data

| _time | _value | *tag |
| --- | --- | --- |
| 2021-01-01T00:00:00Z | -2 | t1 |
| 2021-01-01T00:00:10Z | 10 | t1 |
| 2021-01-01T00:00:20Z | 7 | t1 |
| 2021-01-01T00:00:30Z | 17 | t1 |
| 2021-01-01T00:00:40Z | 15 | t1 |
| 2021-01-01T00:00:50Z | 4 | t1 |

| _time | _value | *tag |
| --- | --- | --- |
|  |  | t2 |

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