Documentation

sampledata.bool() function

Flux 0.128.0+

sampledata.bool returns a sample data set with boolean values.

import "sampledata"

sampledata.bool(
  includeNull: false
)

Parameters

includeNull

Include null values in the returned dataset. Default is false.

Examples

Return sample data with boolean values

Function
import "sampledata"

sampledata.bool()
Output tables
_time tag _value
2021-01-01T00:00:00Z t1 true
2021-01-01T00:00:10Z t1 true
2021-01-01T00:00:20Z t1 false
2021-01-01T00:00:30Z t1 true
2021-01-01T00:00:40Z t1 false
2021-01-01T00:00:50Z t1 false
_time tag _value
2021-01-01T00:00:00Z t2 false
2021-01-01T00:00:10Z t2 true
2021-01-01T00:00:20Z t2 false
2021-01-01T00:00:30Z t2 true
2021-01-01T00:00:40Z t2 true
2021-01-01T00:00:50Z t2 false

Return boolean sample data with null values

Function
import "sampledata"

sampledata.bool(includeNull: true)
Output tables
_time tag _value
2021-01-01T00:00:00Z t1 true
2021-01-01T00:00:10Z t1
2021-01-01T00:00:20Z t1 false
2021-01-01T00:00:30Z t1
2021-01-01T00:00:40Z t1
2021-01-01T00:00:50Z t1 false
_time tag _value
2021-01-01T00:00:00Z t2
2021-01-01T00:00:10Z t2 true
2021-01-01T00:00:20Z t2 false
2021-01-01T00:00:30Z t2 true
2021-01-01T00:00:40Z t2
2021-01-01T00:00:50Z t2 false

Upgrade to InfluxDB Cloud or InfluxDB 2.0!

InfluxDB Cloud and InfluxDB OSS 2.0 ready for production.