InfluxQL transformation functions
InfluxQL transformation functions modify and return values in each row of queried data.
- ABS()
- ACOS()
- ASIN()
- ATAN()
- ATAN2()
- CEIL()
- COS()
- CUMULATIVE_SUM()
- DERIVATIVE()
- DIFFERENCE()
- ELAPSED()
- EXP()
- FLOOR()
- LN()
- LOG()
- LOG2()
- LOG10()
- MOVING_AVERAGE()
- NON_NEGATIVE_DERIVATIVE()
- NON_NEGATIVE_DIFFERENCE()
- POW()
- ROUND()
- SIN()
- SQRT()
- TAN()
Missing InfluxQL functions
Some InfluxQL functions are in the process of being rearchitected to work with the InfluxDB 3 storage engine. If a function you need is not here, check the InfluxQL feature support page for more information.
Notable behaviors of transformation functions
Must use aggregate or selector functions when grouping by time
Most transformation functions support GROUP BY clauses that group by tags,
but do not directly support GROUP BY clauses that group by time.
To use transformation functions with with a GROUP BY time() clause, apply
an aggregate
or selector
function to the field_expression argument.
The transformation operates on the result of the aggregate or selector operation.
ABS()
Returns the absolute value of the field value.
ABS(field_expression)Arguments
- field_expression: Expression to identify one or more fields to operate on.
Can be a field key,
constant, or wildcard (
*). Supports numeric field types.
Notable behaviors
Examples
The following examples use the Random numbers sample data.