Class Flux
- All Implemented Interfaces:
Expression,HasImports
- Direct Known Subclasses:
AbstractParametrizedFlux,ExpressionFlux,VariableAssignment
Flux Specification
The functions:
AggregateWindowFromFluxCountFluxCovarianceFluxCumulativeSumFluxDerivativeFluxDifferenceFluxDistinctFluxDropFluxDuplicateFluxElapsedFluxFillFluxFilterFluxFirstFluxGroupFluxIntegralFluxJoinFluxKeepFluxLastFluxLimitFluxMapFluxMaxFluxMeanFluxMinFluxQuantileFluxPivotFluxRangeFluxRenameFluxSampleFluxSetFluxTimeShiftFluxSkewFluxSortFluxSpreadFluxStddevFluxSumFluxToFluxToBoolFluxToIntFluxToFloatFluxToDurationFluxToStringFluxToTimeFluxToUIntFluxWindowFluxYieldFluxExpressionFlux
- Author:
- Jakub Bednar (bednar@github) (22/06/2018 10:16)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected FluxAdds a new import to this flux.final AggregateWindowApplies an aggregate or selector function to fixed windows of time.final AggregateWindowaggregateWindow(Long every, ChronoUnit everyUnit, String namedFunction) Applies an aggregate or selector function to fixed windows of time.abstract voidappendActual(Map<String, Object> parameters, StringBuilder builder) Append actual Flux function to Flux query.static ArrayFromFluxConstructs a table from an array of records.static ArrayFromFluxConstructs a table from an array of records.asVariable(String name) Converts this flux to a variable assignment so multiple fluxes can be used in conjunction withExpressions.voidcollectImports(Set<String> collectedImports) Collects all imports of the flux.final ColumnsFluxcolumns()Lists the column labels of input tables.final ColumnsFluxLists the column labels of input tables.final CountFluxcount()Counts the number of results.final CountFluxCounts the number of results.final CovarianceFluxCovariance computes the covariance between two columns.final CovarianceFluxcovariance(String[] columns) Covariance computes the covariance between two columns.final CovarianceFluxcovariance(String[] columns, boolean pearsonr) Covariance computes the covariance between two columns.final CovarianceFluxcovariance(String[] columns, boolean pearsonr, String valueDst) Covariance computes the covariance between two columns.final CovarianceFluxcovariance(String[] columns, String valueDst) Covariance computes the covariance between two columns.final CovarianceFluxcovariance(Collection<String> columns) Covariance computes the covariance between two columns.final CovarianceFluxcovariance(Collection<String> columns, boolean pearsonr) Covariance computes the covariance between two columns.final CovarianceFluxcovariance(Collection<String> columns, boolean pearsonr, String valueDst) Covariance computes the covariance between two columns.final CovarianceFluxcovariance(Collection<String> columns, String valueDst) Covariance computes the covariance between two columns.final CumulativeSumFluxComputes a running sum for non null records in the table.final CumulativeSumFluxcumulativeSum(String[] columns) Computes a running sum for non null records in the table.final CumulativeSumFluxcumulativeSum(Collection<String> columns) Computes a running sum for non null records in the table.final DerivativeFluxComputes the time based difference between subsequent non null records.final DerivativeFluxderivative(Long duration, ChronoUnit unit) Computes the time based difference between subsequent non null records.final DifferenceFluxDifference computes the difference between subsequent non null records.final DifferenceFluxdifference(boolean nonNegative) Difference computes the difference between subsequent non null records.final DifferenceFluxdifference(String[] columns) Difference computes the difference between subsequent non null records.final DifferenceFluxdifference(String[] columns, boolean nonNegative) Difference computes the difference between subsequent non null records.final DifferenceFluxdifference(Collection<String> columns) Difference computes the difference between subsequent non null records.final DifferenceFluxdifference(Collection<String> columns, boolean nonNegative) Difference computes the difference between subsequent non null records.final DistinctFluxdistinct()Distinct produces the unique values for a given column.final DistinctFluxDistinct produces the unique values for a given column.final DropFluxdrop()Drop will exclude specified columns from a table.final DropFluxDrop will exclude specified columns from a table.final DropFluxDrop will exclude specified columns from a table.final DropFluxdrop(Collection<String> columns) Drop will exclude specified columns from a table.final DuplicateFluxDuplicate will duplicate a specified column in a table.final DuplicateFluxDuplicate will duplicate a specified column in a table.final ElapsedFluxelapsed()Elapsed will add a column "elapsed" which measures the time elapsed since the last reading in the series (this method defaults to units of 1 ms).final ElapsedFluxelapsed(int count, ChronoUnit unit) Elapsed will add a column "elapsed" which measures the time elapsed since the last reading in the series.final ElapsedFluxelapsed(TimeInterval unit) Elapsed will add a column "elapsed" which measures the time elapsed since the last reading in the series.final ElapsedFluxelapsed(ChronoUnit unit) Elapsed will add a column "elapsed" which measures the time elapsed since the last reading in the series.final ExpressionFluxexpression(String expression) Write the custom Flux expression.final FillFluxfill()Replaces all null values in input tables with a non-null value.final FillFluxReplaces all null values in input tables with a non-null value.final FilterFluxfilter()Returns the first result of the query.final FilterFluxfilter(Restrictions restrictions) Returns the first result of the query.final FirstFluxfirst()Returns the first result of the query.static FromFluxGet data from the specified database.static FromFluxGet data from the specified database.static FromFluxfrom(String bucket, Collection<String> hosts) Get data from the specified database.final <F extends AbstractParametrizedFlux>
FCreate new function with typetype.final GroupFluxgroup()Groups results by a user-specified set of tags.final GroupFluxGroups results by a user-specified set of tags.final GroupFluxGroups results by a user-specified set of tags.final GroupFluxgroupBy(Collection<String> groupBy) Groups results by a user-specified set of tags.final GroupFluxgroupExcept(String except) Groups results by a user-specified set of tags.final GroupFluxgroupExcept(String[] except) Groups results by a user-specified set of tags.final GroupFluxgroupExcept(Collection<String> except) Groups results by a user-specified set of tags.final IntegralFluxintegral()For each aggregate column, it outputs the area under the curve of non null records.final IntegralFluxintegral(Long duration, ChronoUnit unit) For each aggregate column, it outputs the area under the curve of non null records.final InterpolateLinearFluxThe `interpolate.linear` function inserts rows at regular intervals using linear interpolation to determine values for inserted rows.final InterpolateLinearFluxinterpolateLinear(Long duration, ChronoUnit unit) The `interpolate.linear` function inserts rows at regular intervals using linear interpolation to determine values for inserted rows.static JoinFluxjoin()Join two time series together on time and the list of tags.static JoinFluxJoin two time series together on time and the list of tags.final KeepFluxkeep()It will return a table containing only columns that are specified.final KeepFluxIt will return a table containing only columns that are specified.final KeepFluxIt will return a table containing only columns that are specified.final KeepFluxkeep(Collection<String> columns) It will return a table containing only columns that are specified.final LastFluxlast()Returns the last result of the query.final LastFluxReturns the last result of the query.final LimitFluxlimit()Restricts the number of rows returned in the results.final LimitFluxlimit(int numberOfResults) Restricts the number of rows returned in the results.final LimitFluxlimit(int numberOfResults, int offset) Restricts the number of rows returned in the results.final MapFluxmap()Applies a function to each row of the table.final MapFluxApplies a function to each row of the table.final MaxFluxmax()Returns the max value within the results.final MaxFluxReturns the max value within the results.final MeanFluxmean()Returns the mean of the values within the results.final MeanFluxReturns the mean of the values within the results.final MinFluxmin()Returns the min value within the results.final MinFluxReturns the min value within the results.final PivotFluxpivot()Pivot collects values stored vertically (column-wise) in a table and aligns them horizontally (row-wise) into logical sets.final PivotFluxPivot collects values stored vertically (column-wise) in a table and aligns them horizontally (row-wise) into logical sets.final PivotFluxpivot(Collection<String> rowKey, Collection<String> columnKey, String valueColumn) Pivot collects values stored vertically (column-wise) in a table and aligns them horizontally (row-wise) into logical sets.final QuantileFluxquantile()Quantile is both an aggregate operation and a selector operation depending on selected options.final QuantileFluxQuantile is both an aggregate operation and a selector operation depending on selected options.final QuantileFluxquantile(Float quantile, QuantileFlux.MethodType method) Quantile is both an aggregate operation and a selector operation depending on selected options.final QuantileFluxquantile(Float quantile, QuantileFlux.MethodType method, Float compression) Quantile is both an aggregate operation and a selector operation depending on selected options.final QuantileFluxquantile(String column, Float quantile, QuantileFlux.MethodType method, Float compression) Quantile is both an aggregate operation and a selector operation depending on selected options.final RangeFluxrange()Filters the results by time boundaries.final RangeFluxFilters the results by time boundaries.final RangeFluxFilters the results by time boundaries.final RangeFluxrange(Long start, Long stop, ChronoUnit unit) Filters the results by time boundaries.final RangeFluxrange(Long start, ChronoUnit unit) Filters the results by time boundaries.final RangeFluxFilters the results by time boundaries.final RangeFluxFilters the results by time boundaries.final ReduceFluxreduce()Reduce aggregates records in each table according to the reducer.final ReduceFluxReduce aggregates records in each table according to the reducer.final RenameFluxrename()Rename will rename specified columns in a table.final RenameFluxRename will rename specified columns in a table.final RenameFluxRename will rename specified columns in a table.final SampleFluxsample()Sample values from a table.final SampleFluxsample(int n) Sample values from a table.final SampleFluxsample(int n, int pos) Sample values from a table.final SetFluxset()Assigns a static value to each record.final SetFluxAssigns a static value to each record.final SkewFluxskew()Skew of the results.final SkewFluxSkew of the results.final SortFluxsort()Sorts the results by the specified columns Default sort is ascending.final SortFluxsort(boolean desc) Sorts the results by the specified columns Default sort is ascending.final SortFluxSorts the results by the specified columns Default sort is ascending.final SortFluxSorts the results by the specified columns Default sort is ascending.final SortFluxsort(Collection<String> columns) Sorts the results by the specified columns Default sort is ascending.final SortFluxsort(Collection<String> columns, boolean desc) Sorts the results by the specified columns Default sort is ascending.final SpreadFluxspread()Difference between min and max values.final SpreadFluxDifference between min and max values.final StddevFluxstddev()Standard Deviation of the results.final StddevFluxStandard Deviation of the results.final SumFluxsum()Sum of the results.final SumFluxSum of the results.final TailFluxtail()Caps the number of records in output tables.final TailFluxtail(int numberOfResults) Caps the number of records in output tables.final TailFluxtail(int numberOfResults, int offset) Caps the number of records in output tables.final TimeShiftFluxShift add a fixed duration to time columns.final TimeShiftFluxtimeShift(Long amount, ChronoUnit unit) Shift add a fixed duration to time columns.final TimeShiftFluxtimeShift(Long amount, ChronoUnit unit, String[] columns) Shift add a fixed duration to time columns.final TimeShiftFluxtimeShift(Long amount, ChronoUnit unit, Collection<String> columns) Shift add a fixed duration to time columns.final ToFluxto()To operation takes data from a stream and writes it to a bucket.final ToFluxTo operation takes data from a stream and writes it to a bucket.final ToFluxTo operation takes data from a stream and writes it to a bucket.final ToFluxTo operation takes data from a stream and writes it to a bucket.final ToFluxTo operation takes data from a stream and writes it to a bucket.final ToFluxto(String bucket, String org, String host, String token, String timeColumn, String[] tagColumns, String fieldFn) To operation takes data from a stream and writes it to a bucket.final ToFluxto(String bucket, String org, String host, String token, String timeColumn, Collection<String> tagColumns, String fieldFn) To operation takes data from a stream and writes it to a bucket.final ToFluxTo operation takes data from a stream and writes it to a bucket.final ToBoolFluxtoBool()Convert a value to a bool.final ToDurationFluxConvert a value to a duration.final ToFloatFluxtoFloat()Convert a value to a float.final ToIntFluxtoInt()Convert a value to a int.toString()Create the Flux query that can be executed by FluxService.Create the Flux query that can be executed by FluxService.final ToStringFluxConvert a value to a string.final ToTimeFluxtoTime()Convert a value to a time.final ToUIntFluxtoUInt()Convert a value to a uint.final TruncateTimeColumnFluxtruncateTimeColumn(ChronoUnit unit) Truncates all input time values in the _time to a specified unit.static UnionFluxMerges two or more input streams into a single output stream.final WindowFluxwindow()Groups the results by a given time range.final WindowFluxwindow(Long every, ChronoUnit everyUnit) Groups the results by a given time range.final WindowFluxwindow(Long every, ChronoUnit everyUnit, Long period, ChronoUnit periodUnit) Groups the results by a given time range.final WindowFluxwindow(Long every, ChronoUnit everyUnit, Long period, ChronoUnit periodUnit, Long offset, ChronoUnit offsetUnit) Groups the results by a given time range.final WindowFluxwindow(Long every, ChronoUnit everyUnit, Long period, ChronoUnit periodUnit, Long offset, ChronoUnit offsetUnit, String timeColumn, String startColumn, String stopColumn) Partitions the results by a given time range.final WindowFluxwindow(Long every, ChronoUnit everyUnit, Long period, ChronoUnit periodUnit, Instant offset) Groups the results by a given time range.final WindowFluxwindow(Long every, ChronoUnit everyUnit, Long period, ChronoUnit periodUnit, Instant offset, String timeColumn, String startColumn, String stopColumn) Partitions the results by a given time range.final FluxwithFunction(String functionName, Object function) Add named function to current function.final FluxwithFunctionNamed(String functionName, String namedProperty) Add named function to current function.<CALL extends AbstractFunctionCallFlux>
CALLwithPipedFunction(AbstractFunctionFlux<CALL> fun) Creates a piped function call.final FluxwithPropertyNamed(String property) Add named property to current function.final FluxwithPropertyNamed(String fluxName, String namedProperty) Add named property to current function.final FluxwithPropertyValue(String property, Long amount, ChronoUnit unit) Add string property value to current function that will be quoted (value => "value").final FluxwithPropertyValue(String propertyName, Object value) Add property value to current function.final FluxwithPropertyValueEscaped(String property, String value) Add string property value to current function that will be quoted (value => "value").final YieldFluxyield()Yield a query results to yielded results.final YieldFluxYield a query results to yielded results.
-
Field Details
-
functionsParameters
-
imports
-
-
Constructor Details
-
Flux
public Flux()
-
-
Method Details
-
from
Get data from the specified database.- Parameters:
bucket- Bucket name- Returns:
FromFlux
-
from
Get data from the specified database.- Parameters:
bucket- Bucket namehosts- the Fluxd hosts- Returns:
FromFlux
-
from
Get data from the specified database.- Parameters:
bucket- Bucket namehosts- the Fluxd hosts- Returns:
FromFlux
-
aggregateWindow
Applies an aggregate or selector function to fixed windows of time.The parameters had to be defined by:
AggregateWindow.withEvery(Long, ChronoUnit)AggregateWindow.withEvery(String)withFunction(String, Object)AggregateWindow.withAggregateFunction(String)AggregateWindow.withColumn(String)AggregateWindow.withTimeSrc(String)AggregateWindow.withTimeDst(String)AggregateWindow.withCreateEmpty(boolean)
- Returns:
AggregateWindow
-
aggregateWindow
@Nonnull public final AggregateWindow aggregateWindow(@Nonnull Long every, @Nonnull ChronoUnit everyUnit, @Nonnull String namedFunction) Applies an aggregate or selector function to fixed windows of time.The parameters had to be defined by:
AggregateWindow.withEvery(Long, ChronoUnit)AggregateWindow.withEvery(String)withFunction(String, Object)AggregateWindow.withAggregateFunction(String)AggregateWindow.withColumn(String)AggregateWindow.withTimeSrc(String)AggregateWindow.withTimeDst(String)AggregateWindow.withCreateEmpty(boolean)
- Parameters:
every- The duration of windows.everyUnit- aChronoUnitdetermining how to interpret theevery.namedFunction- specifies the named aggregate operation to perform.- Returns:
AggregateWindow
-
arrayFrom
Constructs a table from an array of records.- Returns:
ArrayFromFlux
-
arrayFrom
Constructs a table from an array of records.- Parameters:
rows- Array of records to construct a table with.- Returns:
ArrayFromFlux
-
join
Join two time series together on time and the list of tags.The parameters had to be defined by:
- Returns:
JoinFlux
-
join
@Nonnull public static JoinFlux join(@Nonnull String name1, @Nonnull Flux table1, @Nonnull String name2, @Nonnull Flux table2, @Nonnull String tag, @Nonnull String method) Join two time series together on time and the list of tags.- Parameters:
name1- table 1 nametable1- table 1 Flux scriptname2- table 2 nametable2- table 2 Flux scripttag- tag key to joinmethod- the type of join to be performed- Returns:
JoinFlux
-
keep
It will return a table containing only columns that are specified.The parameters had to be defined by:
- Returns:
KeepFlux
-
keep
It will return a table containing only columns that are specified.- Parameters:
columns- The list of columns that should be included in the resulting table.- Returns:
KeepFlux
-
keep
It will return a table containing only columns that are specified.- Parameters:
columns- The list of columns that should be included in the resulting table.- Returns:
DropFlux
-
keep
It will return a table containing only columns that are specified.- Parameters:
function- The function which takes a column name as a parameter and returns a boolean indicating whether or not the column should be included in the resulting table.- Returns:
DropFlux
-
columns
Lists the column labels of input tables.- Returns:
ColumnsFlux
-
columns
Lists the column labels of input tables.- Parameters:
column- The name of the output column in which to store the column labels.- Returns:
ColumnsFlux
-
count
Counts the number of results.- Returns:
CountFlux
-
count
Counts the number of results.- Parameters:
column- The column to aggregate.- Returns:
CountFlux
-
covariance
Covariance computes the covariance between two columns.The parameters had to be defined by:
- Returns:
CovarianceFlux
-
covariance
Covariance computes the covariance between two columns.- Parameters:
columns- list of columns on which to compute the covariance. Exactly two columns must be provided.- Returns:
CovarianceFlux
-
covariance
Covariance computes the covariance between two columns.- Parameters:
columns- list of columns on which to compute the covariance. Exactly two columns must be provided.- Returns:
CovarianceFlux
-
covariance
@Nonnull public final CovarianceFlux covariance(@Nonnull Collection<String> columns, boolean pearsonr) Covariance computes the covariance between two columns.- Parameters:
columns- list of columns on which to compute the covariance. Exactly two columns must be provided.pearsonr- indicates whether the result should be normalized to be the Pearson R coefficient- Returns:
CovarianceFlux
-
covariance
Covariance computes the covariance between two columns.- Parameters:
columns- list of columns on which to compute the covariance. Exactly two columns must be provided.pearsonr- indicates whether the result should be normalized to be the Pearson R coefficient- Returns:
CovarianceFlux
-
covariance
@Nonnull public final CovarianceFlux covariance(@Nonnull Collection<String> columns, @Nonnull String valueDst) Covariance computes the covariance between two columns.- Parameters:
columns- list of columns on which to compute the covariance. Exactly two columns must be provided.valueDst- column into which the result will be placed.- Returns:
CovarianceFlux
-
covariance
@Nonnull public final CovarianceFlux covariance(@Nonnull String[] columns, @Nonnull String valueDst) Covariance computes the covariance between two columns.- Parameters:
columns- list of columns on which to compute the covariance. Exactly two columns must be provided.valueDst- column into which the result will be placed.- Returns:
CovarianceFlux
-
covariance
@Nonnull public final CovarianceFlux covariance(@Nonnull Collection<String> columns, boolean pearsonr, @Nonnull String valueDst) Covariance computes the covariance between two columns.- Parameters:
columns- list of columns on which to compute the covariance. Exactly two columns must be provided.pearsonr- indicates whether the result should be normalized to be the Pearson R coefficientvalueDst- column into which the result will be placed.- Returns:
CovarianceFlux
-
covariance
@Nonnull public final CovarianceFlux covariance(@Nonnull String[] columns, boolean pearsonr, @Nonnull String valueDst) Covariance computes the covariance between two columns.- Parameters:
columns- list of columns on which to compute the covariance. Exactly two columns must be provided.pearsonr- indicates whether the result should be normalized to be the Pearson R coefficientvalueDst- column into which the result will be placed.- Returns:
CovarianceFlux
-
cumulativeSum
Computes a running sum for non null records in the table.The parameters had to be defined by:
- Returns:
CumulativeSumFlux
-
cumulativeSum
Computes a running sum for non null records in the table.- Parameters:
columns- the columns on which to operate- Returns:
CumulativeSumFlux
-
cumulativeSum
Computes a running sum for non null records in the table.- Parameters:
columns- the columns on which to operate- Returns:
CumulativeSumFlux
-
derivative
Computes the time based difference between subsequent non null records.The parameters had to be defined by:
- Returns:
DerivativeFlux
-
derivative
Computes the time based difference between subsequent non null records.- Parameters:
duration- the time duration to use for the resultunit- aChronoUnitdetermining how to interpret thedurationparameter- Returns:
DerivativeFlux
-
difference
Difference computes the difference between subsequent non null records.The parameters had to be defined by:
- Returns:
DifferenceFlux
-
difference
Difference computes the difference between subsequent non null records.- Parameters:
nonNegative- indicates if the derivative is allowed to be negative- Returns:
DifferenceFlux
-
difference
Difference computes the difference between subsequent non null records.- Parameters:
columns- list of columns on which to compute the difference- Returns:
DifferenceFlux
-
difference
Difference computes the difference between subsequent non null records.- Parameters:
columns- list of columns on which to compute the difference- Returns:
DifferenceFlux
-
difference
@Nonnull public final DifferenceFlux difference(@Nonnull Collection<String> columns, boolean nonNegative) Difference computes the difference between subsequent non null records.- Parameters:
columns- list of columns on which to compute the differencenonNegative- indicates if the derivative is allowed to be negative- Returns:
DifferenceFlux
-
difference
Difference computes the difference between subsequent non null records.- Parameters:
columns- list of columns on which to compute the differencenonNegative- indicates if the derivative is allowed to be negative- Returns:
DifferenceFlux
-
distinct
Distinct produces the unique values for a given column.The parameters had to be defined by:
- Returns:
DistinctFlux
-
distinct
Distinct produces the unique values for a given column.- Parameters:
column- The column on which to track unique values.- Returns:
DistinctFlux
-
drop
Drop will exclude specified columns from a table.The parameters had to be defined by:
- Returns:
DropFlux
-
drop
Drop will exclude specified columns from a table.- Parameters:
columns- The list of columns which should be excluded from the resulting table.- Returns:
DropFlux
-
drop
Drop will exclude specified columns from a table.- Parameters:
columns- The list of columns which should be excluded from the resulting table.- Returns:
DropFlux
-
drop
Drop will exclude specified columns from a table.- Parameters:
function- The function which takes a column name as a parameter and returns a boolean indicating whether or not the column should be excluded from the resulting table.- Returns:
DropFlux
-
duplicate
Duplicate will duplicate a specified column in a table.The parameters had to be defined by:
- Returns:
DuplicateFlux
-
duplicate
Duplicate will duplicate a specified column in a table.The parameters had to be defined by:
- Parameters:
column- the column to duplicateas- the name that should be assigned to the duplicate column- Returns:
DuplicateFlux
-
elapsed
Elapsed will add a column "elapsed" which measures the time elapsed since the last reading in the series.The unit parameter is defined by
ElapsedFlux.withDuration(com.influxdb.query.dsl.functions.properties.TimeInterval).- Parameters:
unit- theTimeIntervalused for measuring elapsed time.- Returns:
- an
ElapsedFluxobject.
-
elapsed
Elapsed will add a column "elapsed" which measures the time elapsed since the last reading in the series.The unit parameter is defined by
ElapsedFlux.withDuration(com.influxdb.query.dsl.functions.properties.TimeInterval).- Parameters:
count- the number of ChronoUnits used for measuring elapsed time.unit-ChronoUnit- Returns:
- an
ElapsedFluxobject.
-
elapsed
Elapsed will add a column "elapsed" which measures the time elapsed since the last reading in the series.In this version the default count is 1. So the interval will be measured only in the provided ChronoUnit.
Internally, the unit parameter is defined by
ElapsedFlux.withDuration(com.influxdb.query.dsl.functions.properties.TimeInterval).- Parameters:
unit- theChronoUnitused for measuring elapsed time.- Returns:
- an
ElapsedFluxobject.
-
elapsed
Elapsed will add a column "elapsed" which measures the time elapsed since the last reading in the series (this method defaults to units of 1 ms).This version defaults to single millisecond time units.
- Returns:
- an
ElapsedFluxobject.
-
fill
Replaces all null values in input tables with a non-null value.The parameters had to be defined by:
- Returns:
FillFlux
-
fill
Replaces all null values in input tables with a non-null value.- Parameters:
value- The constant value to use in place of nulls. The type must match the type of the valueColumn.- Returns:
FillFlux
-
filter
Returns the first result of the query.The parameters had to be defined by:
- Returns:
FilterFlux
-
filter
Returns the first result of the query.- Parameters:
restrictions- filter restrictions- Returns:
FilterFlux
-
first
Returns the first result of the query.- Returns:
FirstFlux
-
group
Groups results by a user-specified set of tags.The parameters had to be defined by:
- Returns:
GroupFlux
-
groupBy
Groups results by a user-specified set of tags.- Parameters:
groupBy- Group by these specific tag name.- Returns:
GroupFlux
-
groupBy
Groups results by a user-specified set of tags.- Parameters:
groupBy- Group by these specific tag names.- Returns:
GroupFlux
-
groupBy
Groups results by a user-specified set of tags.- Parameters:
groupBy- Group by these specific tag names.- Returns:
GroupFlux
-
groupExcept
Groups results by a user-specified set of tags.- Parameters:
except- Group by all but these tag keys Cannot be used.- Returns:
GroupFlux
-
groupExcept
Groups results by a user-specified set of tags.- Parameters:
except- Group by all but these tag keys Cannot be used.- Returns:
GroupFlux
-
groupExcept
Groups results by a user-specified set of tags.- Parameters:
except- Group by all but these tag keys Cannot be used.- Returns:
GroupFlux
-
integral
For each aggregate column, it outputs the area under the curve of non null records.The parameters had to be defined by:
- Returns:
IntegralFlux
-
integral
For each aggregate column, it outputs the area under the curve of non null records.- Parameters:
duration- Time duration to use when computing the integralunit- aChronoUnitdetermining how to interpret thedurationparameter- Returns:
IntegralFlux
-
interpolateLinear
The `interpolate.linear` function inserts rows at regular intervals using linear interpolation to determine values for inserted rows.The parameters had to be defined by:
- Returns:
InterpolateLinearFlux
-
interpolateLinear
@Nonnull public final InterpolateLinearFlux interpolateLinear(@Nonnull Long duration, @Nonnull ChronoUnit unit) The `interpolate.linear` function inserts rows at regular intervals using linear interpolation to determine values for inserted rows.- Parameters:
duration- Time duration to use when computing the interpolationunit- aChronoUnitdetermining how to interpret thedurationparameter- Returns:
InterpolateLinearFlux
-
last
Returns the last result of the query.- Returns:
LastFlux
-
last
Returns the last result of the query.- Parameters:
column- The column used to verify the existence of a value.- Returns:
LastFlux
-
limit
Restricts the number of rows returned in the results.The parameters had to be defined by:
- Returns:
LimitFlux
-
limit
Restricts the number of rows returned in the results.- Parameters:
numberOfResults- The number of results- Returns:
LimitFlux
-
limit
Restricts the number of rows returned in the results.- Parameters:
numberOfResults- The number of resultsoffset- The number of records to skip per table.- Returns:
LimitFlux
-
map
Applies a function to each row of the table.The parameters had to be defined by:
- Returns:
MapFlux
-
map
Applies a function to each row of the table.- Parameters:
function- The function for map row of table. Example: "r._value * r._value".- Returns:
MapFlux
-
max
Returns the max value within the results.- Returns:
MaxFlux
-
max
Returns the max value within the results.- Parameters:
column- The column to use to calculate the maximum value.- Returns:
MaxFlux
-
mean
Returns the mean of the values within the results.- Returns:
MeanFlux
-
mean
Returns the mean of the values within the results.- Parameters:
column- The column to use to compute the mean.- Returns:
MeanFlux
-
min
Returns the min value within the results.- Returns:
MinFlux
-
min
Returns the min value within the results.- Parameters:
column- The column to use to calculate the minimum value.- Returns:
MinFlux
-
quantile
Quantile is both an aggregate operation and a selector operation depending on selected options.The parameters had to be defined by:
QuantileFlux.withColumn(String)QuantileFlux.withQuantile(Float)QuantileFlux.withCompression(Float)QuantileFlux.withMethod(String)QuantileFlux.withMethod(QuantileFlux.MethodType)withPropertyNamed(String)withPropertyNamed(String, String)withPropertyValueEscaped(String, String)withFunction(String, Object)withFunctionNamed(String, String)
- Returns:
QuantileFlux
-
quantile
Quantile is both an aggregate operation and a selector operation depending on selected options.- Parameters:
quantile- value between 0 and 1 indicating the desired quantile- Returns:
QuantileFlux
-
quantile
@Nonnull public final QuantileFlux quantile(@Nonnull Float quantile, @Nonnull QuantileFlux.MethodType method) Quantile is both an aggregate operation and a selector operation depending on selected options.- Parameters:
quantile- value between 0 and 1 indicating the desired quantilemethod- method to aggregate- Returns:
QuantileFlux
-
quantile
@Nonnull public final QuantileFlux quantile(@Nonnull Float quantile, @Nonnull QuantileFlux.MethodType method, @Nonnull Float compression) Quantile is both an aggregate operation and a selector operation depending on selected options.- Parameters:
quantile- value between 0 and 1 indicating the desired quantilemethod- method to aggregatecompression- indicates how many centroids to use when compressing the dataset- Returns:
QuantileFlux
-
quantile
@Nonnull public final QuantileFlux quantile(@Nonnull String column, @Nonnull Float quantile, @Nonnull QuantileFlux.MethodType method, @Nonnull Float compression) Quantile is both an aggregate operation and a selector operation depending on selected options.- Parameters:
column- specifies a column to aggregatequantile- value between 0 and 1 indicating the desired quantilemethod- method to aggregatecompression- indicates how many centroids to use when compressing the dataset.- Returns:
QuantileFlux
-
pivot
Pivot collects values stored vertically (column-wise) in a table and aligns them horizontally (row-wise) into logical sets.The parameters had to be defined by:
- Returns:
PivotFlux
-
pivot
@Nonnull public final PivotFlux pivot(@Nonnull String[] rowKey, @Nonnull String[] columnKey, @Nonnull String valueColumn) Pivot collects values stored vertically (column-wise) in a table and aligns them horizontally (row-wise) into logical sets.- Parameters:
rowKey- the columns used to uniquely identify a row for the outputcolumnKey- the columns used to pivot values onto each row identified by the rowKey.valueColumn- the single column that contains the value to be moved around the pivot- Returns:
PivotFlux
-
pivot
@Nonnull public final PivotFlux pivot(@Nonnull Collection<String> rowKey, @Nonnull Collection<String> columnKey, @Nonnull String valueColumn) Pivot collects values stored vertically (column-wise) in a table and aligns them horizontally (row-wise) into logical sets.- Parameters:
rowKey- the columns used to uniquely identify a row for the outputcolumnKey- the columns used to pivot values onto each row identified by the rowKey.valueColumn- the single column that contains the value to be moved around the pivot- Returns:
PivotFlux
-
range
Filters the results by time boundaries.The parameters had to be defined by:
- Returns:
RangeFlux
-
range
Filters the results by time boundaries.- Parameters:
start- Specifies the oldest time to be included in the results- Returns:
RangeFlux
-
range
Filters the results by time boundaries.- Parameters:
start- Specifies the oldest time to be included in the resultsstop- Specifies the exclusive newest time to be included in the results- Returns:
RangeFlux
-
range
Filters the results by time boundaries.- Parameters:
start- Specifies the oldest time to be included in the resultsunit- aChronoUnitdetermining how to interpret thestartparameter- Returns:
RangeFlux
-
range
@Nonnull public final RangeFlux range(@Nonnull Long start, @Nonnull Long stop, @Nonnull ChronoUnit unit) Filters the results by time boundaries.- Parameters:
start- Specifies the oldest time to be included in the resultsstop- Specifies the exclusive newest time to be included in the resultsunit- aChronoUnitdetermining how to interpret thestartandstopparameter- Returns:
RangeFlux
-
range
Filters the results by time boundaries.- Parameters:
start- Specifies the oldest time (Unix timestamp in seconds) to be included in the resultsstop- Specifies the exclusive newest time (Unix timestamp in seconds) to be included in the results- Returns:
RangeFlux
-
range
Filters the results by time boundaries.- Parameters:
start- Specifies the oldest time (Unix timestamp in seconds) to be included in the results- Returns:
RangeFlux
-
reduce
Reduce aggregates records in each table according to the reducer.The parameters had to be defined by:
- Returns:
ReduceFlux
-
reduce
Reduce aggregates records in each table according to the reducer.- Parameters:
function- Function to apply to each record. Example: "{sum: r._value + accumulator.sum}".identity- An initial value to use when creating a reducer. Example: "{sum: 0.0}".- Returns:
ReduceFlux
-
rename
Rename will rename specified columns in a table.The parameters had to be defined by:
- Returns:
RenameFlux
-
rename
Rename will rename specified columns in a table.- Parameters:
columns- The map of columns to rename and their corresponding new names.- Returns:
RenameFlux
-
rename
Rename will rename specified columns in a table.- Parameters:
function- The function which takes a single string parameter (the old column name) and returns a string representing the new column name.- Returns:
RenameFlux
-
sample
Sample values from a table.The parameters had to be defined by:
- Returns:
SampleFlux
-
sample
Sample values from a table.- Parameters:
n- Sample every Nth element.- Returns:
SampleFlux
-
sample
Sample values from a table.- Parameters:
n- Sample every Nth element.pos- Position offset from start of results to begin sampling. Must be less than @{code n}.- Returns:
SampleFlux
-
set
Assigns a static value to each record.The parameters had to be defined by:
- Returns:
SetFlux
-
set
Assigns a static value to each record.- Parameters:
key- label for the column. Has to be defined.value- value for the column. Has to be defined.- Returns:
SetFlux
-
timeShift
Shift add a fixed duration to time columns.The parameters had to be defined by:
- Returns:
TimeShiftFlux
-
timeShift
Shift add a fixed duration to time columns.- Parameters:
amount- The amount to add to each time valueunit- aChronoUnitdetermining how to interpret theamountparameter- Returns:
TimeShiftFlux
-
timeShift
@Nonnull public final TimeShiftFlux timeShift(@Nonnull Long amount, @Nonnull ChronoUnit unit, @Nonnull String[] columns) Shift add a fixed duration to time columns.- Parameters:
amount- The amount to add to each time valueunit- aChronoUnitdetermining how to interpret theamountparametercolumns- The list of all columns that should be shifted.- Returns:
TimeShiftFlux
-
timeShift
@Nonnull public final TimeShiftFlux timeShift(@Nonnull Long amount, @Nonnull ChronoUnit unit, @Nonnull Collection<String> columns) Shift add a fixed duration to time columns.- Parameters:
amount- The amount to add to each time valueunit- aChronoUnitdetermining how to interpret theamountparametercolumns- The list of all columns that should be shifted.- Returns:
TimeShiftFlux
-
skew
Skew of the results.- Returns:
SkewFlux
-
skew
Skew of the results.- Parameters:
column- The column on which to operate.- Returns:
SkewFlux
-
sort
Sorts the results by the specified columns Default sort is ascending.- Returns:
SortFlux
-
sort
Sorts the results by the specified columns Default sort is ascending.- Parameters:
desc- use the descending sorting- Returns:
SortFlux
-
sort
Sorts the results by the specified columns Default sort is ascending.- Parameters:
columns- columns used to sort- Returns:
SortFlux
-
sort
Sorts the results by the specified columns Default sort is ascending.- Parameters:
columns- columns used to sort- Returns:
SortFlux
-
sort
Sorts the results by the specified columns Default sort is ascending.- Parameters:
columns- columns used to sortdesc- use the descending sorting- Returns:
SortFlux
-
sort
Sorts the results by the specified columns Default sort is ascending.- Parameters:
columns- columns used to sortdesc- use the descending sorting- Returns:
SortFlux
-
spread
Difference between min and max values.- Returns:
SpreadFlux
-
spread
Difference between min and max values.- Parameters:
column- The column on which to operate.- Returns:
SpreadFlux
-
stddev
Standard Deviation of the results.- Returns:
StddevFlux
-
stddev
Standard Deviation of the results.- Parameters:
column- The column on which to operate.- Returns:
StddevFlux
-
sum
Sum of the results.- Returns:
SumFlux
-
sum
Sum of the results.- Parameters:
column- The column on which to operate.- Returns:
SumFlux
-
tail
Caps the number of records in output tables.The parameters had to be defined by:
- Returns:
TailFlux
-
tail
Caps the number of records in output tables.- Parameters:
numberOfResults- The number of results- Returns:
TailFlux
-
tail
Caps the number of records in output tables.- Parameters:
numberOfResults- The number of resultsoffset- The number of records to skip per table.- Returns:
TailFlux
-
to
To operation takes data from a stream and writes it to a bucket.The parameters had to be defined by:
ToFlux.withBucket(String)ToFlux.withBucketID(String)ToFlux.withOrg(String)ToFlux.withOrgID(String)ToFlux.withHost(String)ToFlux.withToken(String)ToFlux.withTimeColumn(String)ToFlux.withTagColumns(Collection)ToFlux.withTagColumns(String[])ToFlux.withFieldFunction(String)withPropertyNamed(String)withPropertyNamed(String, String)withPropertyValueEscaped(String, String)
- Returns:
ToFlux
-
to
To operation takes data from a stream and writes it to a bucket.- Parameters:
bucket- The bucket to which data will be written.- Returns:
ToFlux
-
to
To operation takes data from a stream and writes it to a bucket.- Parameters:
bucket- The bucket to which data will be written.org- The organization name of the above bucket.- Returns:
ToFlux
-
to
@Nonnull public final ToFlux to(@Nonnull String bucket, @Nonnull String org, @Nonnull String fieldFn) To operation takes data from a stream and writes it to a bucket.- Parameters:
bucket- The bucket to which data will be written.org- The organization name of the above bucket.fieldFn- Function that takes a record from the input table and returns an object.- Returns:
ToFlux
-
to
@Nonnull public final ToFlux to(@Nonnull String bucket, @Nonnull String org, @Nonnull String[] tagColumns, @Nonnull String fieldFn) To operation takes data from a stream and writes it to a bucket.- Parameters:
bucket- The bucket to which data will be written.org- The organization name of the above bucket.tagColumns- The tag columns of the output.fieldFn- Function that takes a record from the input table and returns an object.- Returns:
ToFlux
-
to
@Nonnull public final ToFlux to(@Nonnull String bucket, @Nonnull String org, @Nonnull Collection<String> tagColumns, @Nonnull String fieldFn) To operation takes data from a stream and writes it to a bucket.- Parameters:
bucket- The bucket to which data will be written.org- The organization name of the above bucket.tagColumns- The tag columns of the output.fieldFn- Function that takes a record from the input table and returns an object.- Returns:
ToFlux
-
to
@Nonnull public final ToFlux to(@Nonnull String bucket, @Nonnull String org, @Nonnull String host, @Nonnull String token, @Nonnull String timeColumn, @Nonnull String[] tagColumns, @Nonnull String fieldFn) To operation takes data from a stream and writes it to a bucket.- Parameters:
bucket- The bucket to which data will be written.org- The organization name of the above bucket.host- The remote host to write to.token- The authorization token to use when writing to a remote host.timeColumn- The time column of the output.tagColumns- The tag columns of the output.fieldFn- Function that takes a record from the input table and returns an object.- Returns:
ToFlux
-
to
@Nonnull public final ToFlux to(@Nonnull String bucket, @Nonnull String org, @Nonnull String host, @Nonnull String token, @Nonnull String timeColumn, @Nonnull Collection<String> tagColumns, @Nonnull String fieldFn) To operation takes data from a stream and writes it to a bucket.- Parameters:
bucket- The bucket to which data will be written.org- The organization name of the above bucket.host- The remote host to write to.token- The authorization token to use when writing to a remote host.timeColumn- The time column of the output.tagColumns- The tag columns of the output.fieldFn- Function that takes a record from the input table and returns an object.- Returns:
ToFlux
-
toBool
Convert a value to a bool.- Returns:
ToBoolFlux
-
toInt
Convert a value to a int.- Returns:
ToIntFlux
-
toFloat
Convert a value to a float.- Returns:
ToFloatFlux
-
toDuration
Convert a value to a duration.- Returns:
ToDurationFlux
-
toStringConvert
Convert a value to a string.- Returns:
ToStringFlux
-
toTime
Convert a value to a time.- Returns:
ToTimeFlux
-
toUInt
Convert a value to a uint.- Returns:
ToUIntFlux
-
truncateTimeColumn
Truncates all input time values in the _time to a specified unit.- Parameters:
unit- Unit of time to truncate to. Has to be defined.- Returns:
TruncateTimeColumnFlux
-
union
Merges two or more input streams into a single output stream.- Parameters:
tables- the tables to union- Returns:
UnionFlux
-
window
Groups the results by a given time range.The parameters had to be defined by:
WindowFlux.withEvery(Long, ChronoUnit)WindowFlux.withPeriod(Long, ChronoUnit)WindowFlux.withOffset(Long, ChronoUnit)WindowFlux.withOffset(Instant)WindowFlux.withTimeColumn(String)WindowFlux.withStartColumn(String)WindowFlux.withStartColumn(String)withPropertyNamed(String)withPropertyNamed(String, String)withPropertyValueEscaped(String, String)
- Returns:
WindowFlux
-
window
Groups the results by a given time range.- Parameters:
every- duration of time between windowseveryUnit- aChronoUnitdetermining how to interpret theevery- Returns:
WindowFlux
-
window
@Nonnull public final WindowFlux window(@Nonnull Long every, @Nonnull ChronoUnit everyUnit, @Nonnull Long period, @Nonnull ChronoUnit periodUnit) Groups the results by a given time range.- Parameters:
every- duration of time between windowseveryUnit- aChronoUnitdetermining how to interpret theeveryperiod- duration of the windowed partitionperiodUnit- aChronoUnitdetermining how to interpret theperiod- Returns:
WindowFlux
-
window
@Nonnull public final WindowFlux window(@Nonnull Long every, @Nonnull ChronoUnit everyUnit, @Nonnull Long period, @Nonnull ChronoUnit periodUnit, @Nonnull Instant offset) Groups the results by a given time range.- Parameters:
every- duration of time between windowseveryUnit- aChronoUnitdetermining how to interpret theeveryperiod- duration of the windowed partitionperiodUnit- aChronoUnitdetermining how to interpret theperiodoffset- The offset duration relative to the location offset- Returns:
WindowFlux
-
window
@Nonnull public final WindowFlux window(@Nonnull Long every, @Nonnull ChronoUnit everyUnit, @Nonnull Long period, @Nonnull ChronoUnit periodUnit, @Nonnull Long offset, @Nonnull ChronoUnit offsetUnit) Groups the results by a given time range.- Parameters:
every- duration of time between windowseveryUnit- aChronoUnitdetermining how to interpret theeveryperiod- duration of the windowed partitionperiodUnit- aChronoUnitdetermining how to interpret theperiodoffset- The offset duration relative to the location offsetoffsetUnit- aChronoUnitdetermining how to interpret theoffset- Returns:
WindowFlux
-
window
@Nonnull public final WindowFlux window(@Nonnull Long every, @Nonnull ChronoUnit everyUnit, @Nonnull Long period, @Nonnull ChronoUnit periodUnit, @Nonnull Long offset, @Nonnull ChronoUnit offsetUnit, @Nonnull String timeColumn, @Nonnull String startColumn, @Nonnull String stopColumn) Partitions the results by a given time range.- Parameters:
every- duration of time between windowseveryUnit- aChronoUnitdetermining how to interpret theeveryperiod- duration of the windowed partitionperiodUnit- aChronoUnitdetermining how to interpret theperiodoffset- The offset duration relative to the location offsetoffsetUnit- aChronoUnitdetermining how to interpret theoffsettimeColumn- name of the time column to usestartColumn- name of the column containing the window start timestopColumn- name of the column containing the window stop time- Returns:
WindowFlux
-
window
@Nonnull public final WindowFlux window(@Nonnull Long every, @Nonnull ChronoUnit everyUnit, @Nonnull Long period, @Nonnull ChronoUnit periodUnit, @Nonnull Instant offset, @Nonnull String timeColumn, @Nonnull String startColumn, @Nonnull String stopColumn) Partitions the results by a given time range.- Parameters:
every- duration of time between windowseveryUnit- aChronoUnitdetermining how to interpret theeveryperiod- duration of the windowed partitionperiodUnit- aChronoUnitdetermining how to interpret theperiodoffset- The offset duration relative to the location offsettimeColumn- name of the time column to usestartColumn- name of the column containing the window start timestopColumn- name of the column containing the window stop time- Returns:
WindowFlux
-
yield
Yield a query results to yielded results.The parameters had to be defined by:
- Returns:
YieldFlux
-
yield
Yield a query results to yielded results.- Parameters:
name- The unique name to give to yielded results. Has to be defined.- Returns:
YieldFlux
-
expression
Write the custom Flux expression.- Parameters:
expression- flux expression- Returns:
ExpressionFlux
-
function
Create new function with typetype.Flux flux = Flux .from("telegraf") .function(FilterMeasurement.class) .withName("cpu") .sum();- Type Parameters:
F- function type- Parameters:
type- function type- Returns:
- function with
type
-
withPipedFunction
public <CALL extends AbstractFunctionCallFlux> CALL withPipedFunction(AbstractFunctionFlux<CALL> fun) Creates a piped function call.Example Definition
public static class MultByXFunction extends AbstractFunctionFlux<MultByXFunction.MultByXFunctionCall> { public MultByXFunction() { super("multByX", new FreestyleExpression("tables") .map("(r) => ({r with _value: r._value * x})"), MultByXFunctionCall::new, new Parameter("tables").withPipeForward(true), new Parameter("x")); } public static class MultByXFunctionCall extends AbstractFunctionCallFlux { public MultByXFunctionCall(@Nonnull String name) { super(name); } public MultByXFunctionCall withX(final Number x) { this.withPropertyValue("x", x); return this; } } }Example Usage
MultByXFunction multByX = new MultByXFunction(); Expressions flux = new Expressions( multByX, Flux.from("telegraph") .withPipedFunction(multByX) .withX(42.) .count() );- Type Parameters:
CALL- the type of the invocation- Parameters:
fun- the function to be piped- Returns:
- the invocation
-
withPropertyNamed
Add named property to current function.FluxChain fluxChain = new FluxChain() .withPropertyNamed("every", 15, ChronoUnit.MINUTES) .withPropertyNamed("period", 20L, ChronoUnit.SECONDS) .withPropertyNamed("start", -50, ChronoUnit.DAYS) .withPropertyNamed("round", 1L, ChronoUnit.HOURS); Flux flux = Flux.from("telegraf") .window() .withPropertyNamed("every") .withPropertyNamed("period") .withPropertyNamed("start") .withPropertyNamed("round") .sum(); flux.print(fluxChain);- Parameters:
property- name in Flux query and in named properties- Returns:
- a current function.
-
withPropertyNamed
@Nonnull public final Flux withPropertyNamed(@Nonnull String fluxName, @Nonnull String namedProperty) Add named property to current function.Flux flux = Flux .from("telegraf") .limit() .withPropertyNamed("n", "limit") .sum(); FluxChain fluxChain = new FluxChain() .withPropertyNamed("limit", 15); flux.print(fluxChain);- Parameters:
fluxName- name in Flux querynamedProperty- name in named properties- Returns:
- a current function
-
withPropertyValue
Add property value to current function.Flux flux = Flux .from("telegraf") .limit() .withPropertyValue("n", 5) .sum();- Parameters:
propertyName- name in Flux queryvalue- value of property. If null than ignored.- Returns:
- a current function
-
withFunction
Add named function to current function.Flux flux = Flux .from("telegraf") .drop() .withFunction("fn", "column =~ free*");- Parameters:
functionName- name in Flux queryfunction- defined function- Returns:
- a current function
-
withFunctionNamed
@Nonnull public final Flux withFunctionNamed(@Nonnull String functionName, @Nonnull String namedProperty) Add named function to current function.Map<String, Object> parameters = new HashMap<>(); parameters.put("function", "r._value * 10"); Flux flux = Flux .from("telegraf") .range(-12L, ChronoUnit.HOURS) .map() .withFunctionNamed("fn: (r)", "function");- Parameters:
functionName- name in Flux querynamedProperty- name in named properties- Returns:
- a current function
-
withPropertyValue
@Nonnull public final Flux withPropertyValue(@Nonnull String property, @Nullable Long amount, @Nullable ChronoUnit unit) Add string property value to current function that will be quoted (value => "value").Flux flux = Flux .from("telegraf") .window(5, ChronoUnit.MINUTES) .withPropertyValueEscaped("startColumn", "differentCol") .sum();- Parameters:
property- name of property in Flux queryamount- the amount of the duration, measured in terms of the unit, positive or negativeunit- the unit that the duration is measured in, must have an exact duration. If null than ignored.- Returns:
- a current function
-
withPropertyValueEscaped
@Nonnull public final Flux withPropertyValueEscaped(@Nonnull String property, @Nullable String value) Add string property value to current function that will be quoted (value => "value").Flux flux = Flux .from("telegraf") .window(5, ChronoUnit.MINUTES) .withPropertyValueEscaped("startColumn", "differentCol") .sum();- Parameters:
property- name of property in Flux queryvalue- value of property. If null than ignored.- Returns:
- a current function
-
appendActual
public abstract void appendActual(@Nonnull Map<String, Object> parameters, @Nonnull StringBuilder builder) Append actual Flux function to Flux query.- Parameters:
parameters- named parameters for Flux querybuilder- Flux query chaing
-
toString
Create the Flux query that can be executed by FluxService. -
toString
Create the Flux query that can be executed by FluxService.- Parameters:
parameters- flux query named parameters- Returns:
- Flux query
-
toString
- Specified by:
toStringin interfaceExpression- Parameters:
parameters- parameters to resolveprependImports- true, if the imports should be prepended- Returns:
- the string representation of the expression
-
asVariable
Converts this flux to a variable assignment so multiple fluxes can be used in conjunction withExpressions.- Parameters:
name- the name of the variable- Returns:
- a variable assignment
- See Also:
-
getImports
- Specified by:
getImportsin interfaceHasImports- Returns:
- all used imports of this flux
-
collectImports
Collects all imports of the flux.- Parameters:
collectedImports- a set to be filled by the used imports
-
addImport
Adds a new import to this flux.- Parameters:
pImport- the import to be added- Returns:
- this
-