float() function

The float() function converts a single value to a float.

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

  1. float(v: "3.14")

Parameters

v

The value to convert.

*Data type: Boolean | Integer | Numeric String | Uinteger*

Examples

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