Set Comparison Processor

The Set Comparison processor does a set-comparison of input stages.

Accept two DS or NS inputs, called "A" and "B". There are three outputs: A stage "A - B" that contains the items that are only in stage "A," a stage "B - A" that contains the items that are only in stage "B," and a stage "A & B" that contains the items that are in both stage "A" and stage "B."

When conducting the above operations, we first normalize all items in each stage by dropping all the keys that are not in "significant_keys." It is an error if a key in "significant_keys" is not present in either stage "A" or "B."

Furthermore, only the keys of each normalized item are considered; values are preserved (and kept from stage "A" in the intersection output), but not considered in the comparison operations.

Results are undefined if, when normalizing items in either stage_A or stage_B, there is more-than-one item with a given set of key-value pairs.

Parameter Description
Input Types Table (number or discrete state)
Significant Keys (significant_keys) List of keys to map items from the inputs for applying the specified operation. It is typically used by processors that take multiple inputs and perform operations on them. When inputs have the same sets of keys it does not need to be specified. When inputs have different sets of keys, it must be specified and it must allow only 1:1 items mapping from the given inputs, otherwise the probe will go into error state.

Flowchart illustrating a set comparison operation with inputs sets A and B, process labeled Set Comparison, and outputs A minus B, B minus A, and intersection of A and B.
In the Add Processor window of the GUI, hover over the "Set Comparison" tooltip for a visual example of how the Set Comparison processor functions.

Data processing flow for Set Comparison operation showing two input sets A and B with values. Outputs include A minus B with leaf1 45 and leaf3 61, B minus A with leaf4 64, and common items A and B with leaf2 52. Results displayed in tables.

Example: Set Comparison

Consider we have inputs with device temperature information.

Input A:

Input B:

Outputs will be the following.

A - B:

B - A:

A & B: