Package com.influxdb.query.dsl.functions
Class WindowFlux
java.lang.Object
com.influxdb.query.dsl.Flux
com.influxdb.query.dsl.functions.AbstractParametrizedFlux
com.influxdb.query.dsl.functions.WindowFlux
- All Implemented Interfaces:
Expression
,HasImports
Groups the results by a given time range.
See SPEC.
Options
- every - Duration of time between windows. Defaults to period's value. [duration]
- period - Duration of the windowed partition. Defaults to every's value. [duration]
- offset - The offset duration relative to the location offset. It can be negative, indicating that the offset goes backwards in time. The default aligns the window boundaries to line up with the now option time. [time]
- timeColumn - Name of the time column to use. Defaults to _time. [string]
- startColumn - Name of the column containing the window start time. Defaults to _start. [string]
- stopColumn - Name of the column containing the window stop time. Defaults to _stop. [string]
Example
Flux flux = Flux .from("telegraf") .window(15L, ChronoUnit.MINUTES) .max(); Flux flux = Flux .from("telegraf") .window(15L, ChronoUnit.MINUTES, 20L, ChronoUnit.SECONDS, 1L, ChronoUnit.SECONDS) .max();
- Author:
- Jakub Bednar (bednar@github) (27/06/2018 12:01)
-
Field Summary
Fields inherited from class com.influxdb.query.dsl.Flux
functionsParameters, imports
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
collectImports
(Set<String> collectedImports) Collects all imports of the flux.protected String
withEvery
(Long every, ChronoUnit everyUnit) withOffset
(Long offset, ChronoUnit offsetUnit) withOffset
(String offset) withOffset
(Instant offset) withPeriod
(Long period, ChronoUnit periodUnit) withPeriod
(String period) withStartColumn
(String startColumn) withStopCol
(String stopColumn) withTimeColumn
(String timeColumn) Methods inherited from class com.influxdb.query.dsl.functions.AbstractParametrizedFlux
appendActual, beforeAppendOperatorName
Methods 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
-
WindowFlux
-
-
Method Details
-
operatorName
- Specified by:
operatorName
in classAbstractParametrizedFlux
- Returns:
- name of function
-
withEvery
- Parameters:
every
- duration of time between windowseveryUnit
- aChronoUnit
determining how to interpret theevery
- Returns:
- this
-
withEvery
- Parameters:
every
- duration of time between windows- Returns:
- this
-
withPeriod
- Parameters:
period
- duration of the windowed partitionperiodUnit
- aChronoUnit
determining how to interpret theperiod
- Returns:
- this
-
withPeriod
- Parameters:
period
- duration of the windowed partition- Returns:
- this
-
withOffset
- Parameters:
offset
- The offset duration relative to the location offset.offsetUnit
- aChronoUnit
determining how to interpret theoffset
- Returns:
- this
-
withOffset
- Parameters:
offset
- The offset duration relative to the location offset.- Returns:
- this
-
withOffset
- Parameters:
offset
- The offset duration relative to the location offset.- Returns:
- this
-
withTimeColumn
- Parameters:
timeColumn
- name of the time column to use- Returns:
- this
-
withStartColumn
- Parameters:
startColumn
- name of the column containing the window start time- Returns:
- this
-
withStopCol
- Parameters:
stopColumn
- name of the column containing the window stop time- Returns:
- this
-
collectImports
Description copied from class:Flux
Collects all imports of the flux.- Overrides:
collectImports
in classFlux
- Parameters:
collectedImports
- a set to be filled by the used imports
-