math Module

Number crunching and aggregations for your queries.

Quick Example

$ Quick Example
$ ctrl+enter to run

Aggregation Functions

Use these with the aggregate transform to summarize your data.

Scalar Functions

Apply math to individual values, row by row.

Trigonometric Functions

Standard trigonometric functions operating in radians.

Logarithmic & Exponential

Logarithms, exponentials, and mathematical constants.

Function Reference

FunctionTypeDescription
math::sumAggregationCalculate the sum of numeric values
math::avgAggregationCalculate the average of numeric values
math::minAggregationFind the minimum value
math::maxAggregationFind the maximum value
math::absScalarGet the absolute value of a number
math::roundScalarRound to the nearest integer or decimal place
math::floorScalarRound down to the nearest integer
math::ceilScalarRound up to the nearest integer
math::powerScalarRaise a number to a power
math::sqrtScalarCompute the square root
math::signScalarReturn the sign of a number
math::clampScalarClamp a value within a range
math::modScalarCompute the modulo (remainder)
math::truncateScalarTruncate a number toward zero
math::gcdScalarGreatest common divisor
math::lcmScalarLeast common multiple
math::sinTrigonometricCompute the sine
math::cosTrigonometricCompute the cosine
math::tanTrigonometricCompute the tangent
math::asinTrigonometricCompute the arcsine
math::acosTrigonometricCompute the arccosine
math::atanTrigonometricCompute the arctangent
math::atan2TrigonometricTwo-argument arctangent
math::expExponentialCompute e raised to a power
math::logLogarithmicNatural logarithm (base e)
math::log2LogarithmicBase-2 logarithm
math::log10LogarithmicBase-10 logarithm
math::eConstantEuler's number (~2.71828)
math::piConstantPi (~3.14159)