experimental.count() function
The experimental.count()
function is subject to change at any time.
By using this function, you accept the risks of experimental functions.
The experimental.count()
function outputs the number of records in each input table
and returns the count in the _value
column.
This function counts both null and non-null records.
experimental.count()
is an aggregate function.
import "experimental"
experimental.count()
Empty tables
experimental.count()
returns 0
for empty tables.
To keep empty tables in your data, set the following parameters for the following functions:
Function | Parameter |
---|---|
filter() | onEmpty: "keep" |
window() | createEmpty: true |
aggregateWindow() | createEmpty: true |
Parameters
tables
Input data.
Default is piped-forward data (<-
).
Examples
import "experimental"
from(bucket: "example-bucket")
|> range(start: -5m)
|> experimental.count()
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for Flux and this documentation. To find support, the following resources are available:
InfluxDB Cloud customers can contact InfluxData Support.