Package com.influxdb.query.dsl.functions
Class DifferenceFlux
java.lang.Object
com.influxdb.query.dsl.Flux
com.influxdb.query.dsl.functions.AbstractParametrizedFlux
com.influxdb.query.dsl.functions.DifferenceFlux
- All Implemented Interfaces:
Expression,HasImports
Difference computes the difference between subsequent non null records.
See SPEC.
Options
- nonNegative - Indicates if the derivative is allowed to be negative. If a value is encountered which is less than the previous value then it is assumed the previous value should have been a zero [boolean].
- columns - The list of columns on which to compute the difference. Defaults ["_value"] [array of strings].
Example
Flux flux = Flux
.from("telegraf")
.groupBy("_measurement")
.difference();
Flux flux = Flux
.from("telegraf")
.range(-5L, ChronoUnit.MINUTES)
.difference(new String[]{"_value", "_time"}, false)
- Author:
- Jakub Bednar (bednar@github) (17/07/2018 12:28)
-
Field Summary
Fields inherited from class com.influxdb.query.dsl.Flux
functionsParameters, imports -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcollectImports(Set<String> collectedImports) Collects all imports of the flux.protected StringwithColumns(String[] columns) withColumns(Collection<String> columns) withNonNegative(boolean nonNegative) Methods inherited from class com.influxdb.query.dsl.functions.AbstractParametrizedFlux
appendActual, beforeAppendOperatorNameMethods inherited from class com.influxdb.query.dsl.Flux
addImport, aggregateWindow, aggregateWindow, arrayFrom, arrayFrom, asVariable, columns, columns, count, count, covariance, covariance, covariance, covariance, covariance, covariance, covariance, covariance, covariance, cumulativeSum, cumulativeSum, cumulativeSum, derivative, derivative, difference, difference, difference, difference, difference, difference, distinct, distinct, drop, drop, drop, drop, duplicate, duplicate, elapsed, elapsed, elapsed, elapsed, expression, fill, fill, filter, filter, first, from, from, from, function, getImports, group, groupBy, groupBy, groupBy, groupExcept, groupExcept, groupExcept, integral, integral, interpolateLinear, interpolateLinear, join, join, keep, keep, keep, keep, last, last, limit, limit, limit, map, map, max, max, mean, mean, min, min, pivot, pivot, pivot, quantile, quantile, quantile, quantile, quantile, range, range, range, range, range, range, range, reduce, reduce, rename, rename, rename, sample, sample, sample, set, set, skew, skew, sort, sort, sort, sort, sort, sort, spread, spread, stddev, stddev, sum, sum, tail, tail, tail, timeShift, timeShift, timeShift, timeShift, to, to, to, to, to, to, to, to, toBool, toDuration, toFloat, toInt, toString, toString, toString, toStringConvert, toTime, toUInt, truncateTimeColumn, union, window, window, window, window, window, window, window, withFunction, withFunctionNamed, withPipedFunction, withPropertyNamed, withPropertyNamed, withPropertyValue, withPropertyValue, withPropertyValueEscaped, yield, yield
-
Constructor Details
-
DifferenceFlux
-
-
Method Details
-
operatorName
- Specified by:
operatorNamein classAbstractParametrizedFlux- Returns:
- name of function
-
withNonNegative
- Parameters:
nonNegative- indicates if the derivative is allowed to be negative- Returns:
- this
-
withColumns
- Parameters:
columns- list of columns on which to compute the difference- Returns:
- this
-
withColumns
- Parameters:
columns- list of columns on which to compute the difference- Returns:
- this
-
collectImports
Description copied from class:FluxCollects all imports of the flux.- Overrides:
collectImportsin classFlux- Parameters:
collectedImports- a set to be filled by the used imports
-