Documentation

types.isNumeric() function

types.isNumeric() tests if a value is a numeric type (int, uint, or float).

This is a helper function to test or filter for values that can be used in arithmatic operations or aggregations.

Function type signature
(v: A) => bool where A: Basic
For more information, see Function type signatures.

Parameters

v

(Required) Value to test.

Examples

Filter by numeric values

import "types"

data
    |> filter(fn: (r) => types.isNumeric(v: r._value))

View example input and output


Was this page helpful?

Thank you for your feedback!


Upgrade to InfluxDB Cloud or InfluxDB 2.0!

InfluxDB Cloud and InfluxDB OSS 2.0 ready for production.