Was this helpful?
Discover Domain Operator
DiscoverDomain Operator
The DiscoverDomain operator can be used as a 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 want to compute their domains.
Code Example
The following example demonstrates configuring and using the DiscoverDomain operator within an iterative operator.
Configuring the DiscoverDomain operator in Java
// Configuring the operator with an IterativeExecutionContext
LogicalSubgraph graph = ctx.newSubgraph();
DiscoverDomain dd = graph.add(new DiscoverDomain());
dd.setIncludedFields(Arrays.asList(new String[]{"field1", "field2", "field3"}));
dd.setMaxDiscoveredValues(100);
graph.connect(input, dd.getInput());
graph.run();
RecordTokenType type = dd.getResult();
Using DiscoverDomain in RushScript
var discoverDomain = dr.discoverDomain(data, {maxDiscoveredValues:100, includedFields:['field1', 'field2', 'field3']});
Properties
The DiscoverDomain operator provides the following properties.
Name
Type
Description
includedFields
List<String>
A list of fields to include in the discovery. The default value of "empty" implies that we include all fields.
maxDiscoveredValues
int
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.
Ports
The DiscoverDomain operator provides a single input port.
Name
Type
Get Method
Description
input
getInput()
The data containing the fields to convert.
The DiscoverDomain operator does not provide an output port. Instead when the operator has , you can get the result of the domain discovery.
Name
Type
Get Method
Description
result
getResult()
The discovered field information.
Last modified date: 03/10/2025