Documentation

Flux function types and categories

Flux functions share a set of behaviors or traits that define how the function works. This types and categories lists below are not all-inclusive, but covers distinct and important function behaviors.

The icon indicates the function is experimental.


Function types


Inputs

Flux input functions return data from data sources. The following input functions are available:


Outputs

Flux output functions yield results or send data to a specified output destination. The following output functions are are available:


Transformations

Flux transformations take a stream of tables as input, transform the data in some way, and output a stream of tables. Transformations cover a broad range of functions, but the following categorizations highlight important behaviors associated with specific transformation functions.

aggregateWindow helper function

The aggregateWindow() function windows or groups data by time and applies an aggregate or selector function to input tables. All aggregate and selector functions work with aggregateWindow().

Aggregates

Flux aggregate functions are transformations aggregate values from input tables in some way. Output tables contain a single row with the aggregated value. Aggregate transformations output a table for every input table they receive.

Each output table from an aggregate function will:

  • Contain a single record.
  • Have the same group key as the input table.
  • Contain the an aggregated column. The column label will be the same as the input table. The column data type depends on the specific aggregate operation. The value of the column will be null if the input table is empty or the input column has only null values.
  • Drop all columns that are:
    • not in the group key
    • not the aggregated column

The following aggregate functions are available:

Aggregate selectors

The following functions are both aggregates and selectors. Each returns n values after performing an aggregate operation. They are categorized as selector functions in this documentation:

Selectors

Flux selector functions are transformations that return one or more record per input table.

Each output table from a selector function will:

  • Contain one or more unmodified records.
  • Have the same group key as the input table.

The following selector functions are available:

Selectors and aggregates

The following functions can be used as both selectors or aggregates, but they are categorized as aggregate functions in this documentation:


Dynamic queries

Flux dynamic query functions extract a table from a stream of tables and access its columns and records. For recommended usage, see Extract scalar values.


Function categories

The following categories represent high-level function behaviors.

Filters

Filter functions iterate over and evaluate each input row to see if it matches specified conditions. Rows that do not match the specified conditions are dropped from the output. The following filter functions are available:


Type conversions

Flux type conversion functions convert scalar values or columns to a specific data type. The following type conversion functions are available:


Tests

Flux testing functions test various aspects of data. Tests return either true or false, a transformed stream of tables, or, upon failure, an error. The following testing functions are available:


Date/time

Flux date/time functions return or operate on time or duration values. The following data/time functions are available:


Metadata

Flux metadata functions return metadata from the input stream or from an underlying data source. The following metadata functions are available:


Notification endpoints

Flux notification endpoint functions send notifications to external endpoints or services. The following notification endpoint functions are available:


Geotemporal

Flux geotemporal functions are designed to work with geotemporal data (geographic location over time). The following geotemporal functions are available:


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

InfluxDB v3 enhancements and InfluxDB Clustered is now generally available

New capabilities, including faster query performance and management tooling advance the InfluxDB v3 product line. InfluxDB Clustered is now generally available.

InfluxDB v3 performance and features

The InfluxDB v3 product line has seen significant enhancements in query performance and has made new management tooling available. These enhancements include an operational dashboard to monitor the health of your InfluxDB cluster, single sign-on (SSO) support in InfluxDB Cloud Dedicated, and new management APIs for tokens and databases.

Learn about the new v3 enhancements


InfluxDB Clustered general availability

InfluxDB Clustered is now generally available and gives you the power of InfluxDB v3 in your self-managed stack.

Talk to us about InfluxDB Clustered