- java.lang.Object
-
- com.pervasive.datarush.operators.AbstractLogicalOperator
-
- com.pervasive.datarush.operators.CompositeOperator
-
- com.pervasive.datarush.operators.record.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 Summary
Constructors Constructor Description DiscoverDomain()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
compose(CompositionContext ctx)
Compose the body of this operator.List<String>
getIncludedFields()
Returns a list of fields to include in the discovery.RecordPort
getInput()
Returns the input port containing the string fields to convertint
getMaxDiscoveredValues()
Returns the maximum number of values to discover.RecordTokenType
getResult()
Returns the discovered resultvoid
setIncludedFields(List<String> includedFields)
Sets a list of fields to include in the discovery.void
setMaxDiscoveredValues(int maxDiscoveredValues)
Sets the maximum number of values to discover.-
Methods inherited from class com.pervasive.datarush.operators.AbstractLogicalOperator
disableParallelism, getInputPorts, getOutputPorts, newInput, newInput, newOutput, newRecordInput, newRecordInput, newRecordOutput, notifyError
-
-
-
-
Method Detail
-
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:- Perform any validation of configuration, input types, etc
- Instantiate and configure sub-operators, adding them to the provided context via
the method
OperatorComposable.add(O)
- 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 classCompositeOperator
- Parameters:
ctx
- the context
-
-