Class DiscoverDomain

All Implemented Interfaces:
LogicalOperator

public final class DiscoverDomain extends CompositeOperator
Utility operator for discovering the domain of string fields. Note that this is not intended to be used as a "top-level" operator; rather this is a utility for iterative operators that wish to compute their domains
  • Constructor Details

    • DiscoverDomain

      public DiscoverDomain()
  • Method Details

    • getInput

      public RecordPort getInput()
      Returns the input port containing the string fields to convert
      Returns:
      the input port containing the string fields to convert
    • getIncludedFields

      public List<String> getIncludedFields()
      Returns a list of fields to include in the discovery. The default value of "empty" implies that we include all fields.
      Returns:
      a list of fields to include
    • setIncludedFields

      public void setIncludedFields(List<String> includedFields)
      Sets a list of fields to include in the discovery. The default value of "empty" implies that we include all fields.
      Parameters:
      includedFields - a list of fields to include
    • getMaxDiscoveredValues

      public int getMaxDiscoveredValues()
      Returns the maximum number of values to discover. This places a cap on the memory usage in the event that the input data contains a large number of distinct values. Fields that exceed the number of discovered values will remain as strings. This is 1000 by default.
      Returns:
      the maximum number of values to discover
    • setMaxDiscoveredValues

      public void setMaxDiscoveredValues(int maxDiscoveredValues)
      Sets the maximum number of values to discover. This places a cap on the memory usage in the event that the input data contains a large number of distinct values. Fields that exceed the number of discovered values will remain as strings. This is 1000 by default.
      Parameters:
      maxDiscoveredValues - the maximum number of values to discover
    • getResult

      public RecordTokenType getResult()
      Returns the discovered result
      Returns:
    • compose

      protected void compose(CompositionContext ctx)
      Description copied from class: CompositeOperator
      Compose the body of this operator. Implementations should do the following:
      1. Perform any validation of configuration, input types, etc
      2. Instantiate and configure sub-operators, adding them to the provided context via the method OperatorComposable.add(O)
      3. Create necessary connections via the method OperatorComposable.connect(P, P). This includes connections from the composite's input ports to sub-operators, connections between sub-operators, and connections from sub-operators output ports to the composite's output ports
      Specified by:
      compose in class CompositeOperator
      Parameters:
      ctx - the context