Documentation

table.fill() function

Flux 0.115.0+

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()

Parameters

tables

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

Examples

Query
import "experimental/table"

data
  |> table.fill()
Input data

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

host _field time _value
host1 f1 0001 2.8
host1 f1 0002 3.2
host1 f1 0003 3.3

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

host _field time _value

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

host _field time _value
host3 f1 0001 1.4
host3 f1 0002 1.5
host3 f1 0003 2.7
Output data

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

host _field time _value
host1 f1 0001 2.8
host1 f1 0002 3.2
host1 f1 0003 3.3

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

host _field time _value
host2 f1

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

host _field time _value
host3 f1 0001 1.4
host3 f1 0002 1.5
host3 f1 0003 2.7

Upgrade to InfluxDB Cloud or InfluxDB 2.0!

InfluxDB Cloud and InfluxDB OSS 2.0 ready for production.