Class QuantileFlux

All Implemented Interfaces:
Expression, HasImports

public final class QuantileFlux extends AbstractParametrizedFlux
Quantile is both an aggregate operation and a selector operation depending on selected options. In the aggregate methods, it outputs the value that represents the specified quantile of the non null record as a float. See SPEC.

Options

  • column - column to aggregate. Defaults to _value. [string]
  • quantile - value between 0 and 1 indicating the desired quantile. [float]
  • method - method to aggregate
  • compression - Compression indicates how many centroids to use when compressing the dataset. A larger number produces a more accurate result at the cost of increased memory requirements. Defaults to 1000. [float]

Example

 Flux flux = Flux
     .from("telegraf")
     .quantile(0.80F);

 Flux flux = Flux
     .from("telegraf")
     .quantile()
         .withQuantile(0.75F)
         .withMethod(MethodType.EXACT_MEAN)
         .withCompression(2_000F);
 
Author:
Jakub Bednar (10/10/2018 11:34)
  • Constructor Details

    • QuantileFlux

      public QuantileFlux(@Nonnull Flux source)
  • Method Details

    • operatorName

      @Nonnull protected String operatorName()
      Specified by:
      operatorName in class AbstractParametrizedFlux
      Returns:
      name of function
    • withColumn

      @Nonnull public QuantileFlux withColumn(@Nonnull String column)
      Parameters:
      column - The column to aggregate. Defaults to "_value".
      Returns:
      this
    • withQuantile

      @Nonnull public QuantileFlux withQuantile(@Nonnull Float quantile)
      Parameters:
      quantile - value between 0 and 1 indicating the desired quantile
      Returns:
      this
    • withCompression

      @Nonnull public QuantileFlux withCompression(@Nonnull Float compression)
      Parameters:
      compression - indicates how many centroids to use when compressing the dataset.
      Returns:
      this
    • withMethod

      @Nonnull public QuantileFlux withMethod(@Nonnull String method)
      Parameters:
      method - method to aggregate
      Returns:
      this
    • withMethod

      @Nonnull public QuantileFlux withMethod(@Nonnull QuantileFlux.MethodType method)
      Parameters:
      method - method to aggregate
      Returns:
      this
    • collectImports

      public void collectImports(@Nonnull Set<String> collectedImports)
      Description copied from class: Flux
      Collects all imports of the flux.
      Overrides:
      collectImports in class Flux
      Parameters:
      collectedImports - a set to be filled by the used imports