string() function

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

Function type: Type conversion
Output data type: String

string(v: 123456789)



The value to convert.

Data type: Boolean | Bytes | Duration | Float | Integer | Time | Uinteger


from(bucket: "sensor-data")
  |> range(start: -1m)
  |> filter(fn:(r) => r._measurement == "system" )
  |> map(fn:(r) => ({ r with model_number: string(v: r.model_number) }))

Cloud or OSS?

InfluxDB OSS 2.0 now generally available!

InfluxDB OSS 2.0 is now generally available and ready for production use. See the InfluxDB OSS 2.0 release notes.

For information about upgrading to InfluxDB OSS 2.0, see: