Documentation

query.filterFields() function

query.filterFields() is experimental and subject to change at any time.

query.filterFields() filters input data by field.

Function type signature
(<-table: stream[{B with _field: A}], ?fields: [A]) => stream[{B with _field: A}] where A: Nullable
For more information, see Function type signatures.

Parameters

fields

Fields to filter by. Default is [].

table

Input data. Default is piped-forward data (<-).

Examples

Query specific fields from InfluxDB

import "experimental/query"

query.fromRange(bucket: "telegraf", start: -1h)
    |> query.filterFields(fields: ["used_percent", "available_percent"])

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.