Documentation

Work with null types

The null type represents a missing or unknown value.

Type name: null

Null syntax

Null types exist in columns of other basic types, but there is no literal syntax to represent a null value.

An empty string ("") is not a null value.

Check if a column value is null

In functions that iterate over rows (such as filter() or map()), use the exists logical operator to check if a column value is null.

Filter out rows with null values
data
  |> filter(fn: (r) => exists r._value)
Given the following input data:
_time_value
2021-01-01T00:00:00Z1.2
2021-01-01T02:00:00Z
2021-01-01T03:00:00Z2.5
2021-01-01T04:00:00Z
The example above returns:
_time_value
2021-01-01T00:00:00Z1.2
2021-01-01T03:00:00Z2.5

Upgrade to InfluxDB Cloud or InfluxDB 2.0!

InfluxDB Cloud and InfluxDB OSS 2.0 ready for production.