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!


The future of Flux

Flux is going into maintenance mode. You can continue using it as you currently are without any changes to your code.

Read more