bool() function

The bool() function converts a single value to a boolean.

*Function type: Type conversion
**
Output data type:* Boolean

  1. bool(v: "true")

Parameters

v

The value to convert.

*Data type: Float | Integer | String | Uinteger*

Examples

  1. from(bucket: "sensor-data")
  2. |> range(start: -1m)
  3. |> filter(fn:(r) => r._measurement == "system" )
  4. |> map(fn:(r) => ({ r with responsive: bool(v: r.responsive) }))