Package com.influxdb.query.dsl.functions
Class ToFlux
java.lang.Object
com.influxdb.query.dsl.Flux
com.influxdb.query.dsl.functions.AbstractParametrizedFlux
com.influxdb.query.dsl.functions.ToFlux
- All Implemented Interfaces:
Expression
,HasImports
The To operation takes data from a stream and writes it to a bucket.
See SPEC.
Options
- bucket - The bucket to which data will be written. [string]
- bucketID - The bucket to which data will be written. [string]
- org - The organization name of the above bucket. [string]
- orgID - The organization ID of the above bucket. [string]
- host - The remote host to write to. [string]
- token - The authorization token to use when writing to a remote host. [string]
- timeColumn - The time column of the output. [string]
- tagColumns - The tag columns of the output.
- fieldFn - Function that takes a record from the input table and returns an object.
Examples
Flux flux = Flux .from("telegraf") .to("my-bucket");
Flux flux = Flux .from("telegraf") .to("my-bucket", "my-org");
- Author:
- Jakub Bednar (10/10/2018 07:58)
-
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
withBucket
(String bucket) withBucketID
(String bucketID) withFieldFunction
(String fieldFn) withTagColumns
(String[] tagColumns) withTagColumns
(Collection<String> tagColumns) 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
-
ToFlux
-
-
Method Details
-
operatorName
- Specified by:
operatorName
in classAbstractParametrizedFlux
- Returns:
- name of function
-
withBucket
- Parameters:
bucket
- The bucket to which data will be written.- Returns:
- this
-
withBucketID
- Parameters:
bucketID
- The ID of the bucket to which data will be written.- Returns:
- this
-
withOrg
- Parameters:
org
- The organization name of the above bucket.- Returns:
- this
-
withOrgID
- Parameters:
orgID
- The organization name of the above bucket.- Returns:
- this
-
withHost
- Parameters:
host
- The remote host to write to.- Returns:
- this
-
withToken
- Parameters:
token
- The authorization token to use when writing to a remote host.- Returns:
- this
-
withTimeColumn
- Parameters:
timeColumn
- The time column of the output.- Returns:
- this
-
withTagColumns
- Parameters:
tagColumns
- The tag columns of the output.- Returns:
- this
-
withTagColumns
- Parameters:
tagColumns
- The tag columns of the output.- Returns:
- this
-
withFieldFunction
- Parameters:
fieldFn
- Function that takes a record from the input table and returns an object.- 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
-