Documentation

table.fill() function

The table.fill() function is experimental and subject to change at any time. By using this function, you accept the risks of experimental functions.

The table.fill() function 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.

import "experimental/table"

table.fill()

Examples

Query
import "experimental/table"

data
  |> table.fill()
Input data

Group key = [host: "host1", _field: "f1"]

host_fieldtime_value
host1f100012.8
host1f100023.2
host1f100033.3

Group key = [host: "host2", _field: "f1"]

host_fieldtime_value

Group key = [host: "host3", _field: "f1"]

host_fieldtime_value
host3f100011.4
host3f100021.5
host3f100032.7
Output data

Group key = [host: "host1", _field: "f1"]

host_fieldtime_value
host1f100012.8
host1f100023.2
host1f100033.3

Group key = [host: "host2", _field: "f1"]

host_fieldtime_value
host2f1

Group key = [host: "host3", _field: "f1"]

host_fieldtime_value
host3f100011.4
host3f100021.5
host3f100032.7

Select your region

Upgrade to InfluxDB Cloud or InfluxDB 2.0!

InfluxDB Cloud and InfluxDB OSS 2.0 ready for production.