Class SetFlux

All Implemented Interfaces:
Expression, HasImports

public final class SetFlux extends AbstractParametrizedFlux
Assigns a static value to each record. See SPEC.

Options

  • key - Label for the column to set [string].
  • value - Value for the column to set [string]

Example

 Flux flux = Flux
     .from("telegraf")
     .set("location", "Carolina");
 
Author:
Jakub Bednar (bednar@github) (29/06/2018 09:19)
  • Constructor Details

    • SetFlux

      public SetFlux(@Nonnull Flux source)
  • Method Details

    • operatorName

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

      @Nonnull public SetFlux withKeyValue(@Nonnull String key, @Nonnull String value)
      Parameters:
      key - label for the column. Has to be defined.
      value - value for the column. Has to be defined.
      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