Package com.influxdb.query.dsl.functions
Class FromFlux
java.lang.Object
com.influxdb.query.dsl.Flux
com.influxdb.query.dsl.functions.AbstractParametrizedFlux
com.influxdb.query.dsl.functions.FromFlux
- All Implemented Interfaces:
Expression
,HasImports
From produces a stream of tables from the specified bucket.
See SPEC.
Options
- bucket - The name of the bucket to query [string]
- hosts - array of strings from(bucket:"telegraf", hosts:["host1", "host2"])
Example
Flux flux = Flux.from("telegraf"); Flux flux = Flux .from("telegraf", new String[]{"192.168.1.200", "192.168.1.100"}) .last();
- Author:
- Jakub Bednar (bednar@github) (22/06/2018 10:20)
-
Field Summary
Fields inherited from class com.influxdb.query.dsl.Flux
functionsParameters, imports
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
appendActual
(Map<String, Object> parameters, StringBuilder builder) Append actual Flux function to Flux query.void
collectImports
(Set<String> collectedImports) Collects all imports of the flux.protected String
withBucket
(String bucket) withHosts
(Collection<String> hosts) withLocationFixed
(String offset) Use a location with a fixed offset.withLocationNamed
(String name) Use a timezone based on a location name.Methods inherited from class com.influxdb.query.dsl.functions.AbstractParametrizedFlux
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
-
FromFlux
public FromFlux()
-
-
Method Details
-
operatorName
- Specified by:
operatorName
in classAbstractParametrizedFlux
- Returns:
- name of function
-
withBucket
- Parameters:
bucket
- Bucket name- Returns:
FromFlux
-
withHosts
- Parameters:
hosts
- the Fluxd hosts- Returns:
FromFlux
-
withHosts
- Parameters:
hosts
- the Fluxd hosts- Returns:
FromFlux
-
withLocationNamed
Use a timezone based on a location name.- Parameters:
name
- Location name as defined by InfluxDB server operating system timezone database- Returns:
- this
-
withLocationFixed
Use a location with a fixed offset.- Parameters:
offset
- The fixed duration for the location offset. The duration is the offset from UTC time.- Returns:
- this
-
appendActual
Description copied from class:Flux
Append actual Flux function to Flux query.- Overrides:
appendActual
in classAbstractParametrizedFlux
- Parameters:
parameters
- named parameters for Flux querybuilder
- Flux query chaing
-
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
-