java.lang.Object
com.pervasive.datarush.operators.AbstractLogicalOperator
com.pervasive.datarush.operators.CompositeOperator
com.pervasive.datarush.matching.block.BlockSelf
- All Implemented Interfaces:
LogicalOperator
Block records from a single source into groups of like records based on
a set of key fields and generate record pairs from these groups.
Blocking records in this way allows reduces the number of record pairs
generated which leads to many less comparison operations. This can
dramatically speed up execution of record matching if the keys are
trustworthy.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidCompose the body of this operator.getInput()Gets the record port providing the input to the pair generation.String[]getKeys()Get the fields being used for blockingGets the output naming pattern for fields on the left hand side of the pair.Gets the record port providing the results of the pair generation.Gets the output naming pattern for fields on the right hand side of the pair.voidSet the fields to use as keys for blocking.voidsetLeftFieldPattern(String pattern) Sets the output naming pattern for fields on the left hand side of pairs.voidsetRightFieldPattern(String pattern) Sets the output naming pattern for fields on the right hand side of pairs.Methods inherited from class com.pervasive.datarush.operators.AbstractLogicalOperator
disableParallelism, getInputPorts, getOutputPorts, newInput, newInput, newOutput, newRecordInput, newRecordInput, newRecordOutput, notifyError
-
Constructor Details
-
BlockSelf
public BlockSelf()Block records from a single source. Records from the source will be blocked based on key sets and record pairs generated from these groups. Key fields must be identified before execution.- See Also:
-
-
Method Details
-
getInput
Gets the record port providing the input to the pair generation.- Returns:
- the input port for the operation
-
getOutput
Gets the record port providing the results of the pair generation.- Returns:
- the output port for the operation
-
getLeftFieldPattern
Gets the output naming pattern for fields on the left hand side of the pair.- Returns:
- the pattern for the left hand side field names in output.
-
setLeftFieldPattern
Sets the output naming pattern for fields on the left hand side of pairs. This is used to ensure distinct names in the output pairs.- Parameters:
pattern- name pattern for the left hand side field names
-
getRightFieldPattern
Gets the output naming pattern for fields on the right hand side of the pair.- Returns:
- the pattern for the right hand side field names in output.
-
setRightFieldPattern
Sets the output naming pattern for fields on the right hand side of pairs. This is used to ensure distinct names in the output pairs.- Parameters:
pattern- name pattern for the eight hand side field names
-
getKeys
Get the fields being used for blocking- Returns:
- the set of key fields
-
setKeys
Set the fields to use as keys for blocking. Only record pairs where these keys are equal will be output.- Parameters:
keys- the set of key fields
-
compose
Description copied from class:CompositeOperatorCompose 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:
composein classCompositeOperator- Parameters:
ctx- the context
-