Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Announcement: Try the Ask AI chatbot for answers to your technical questions about Juniper products and solutions.

close
header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
Juniper Apstra 5.1.0 User Guide
Table of Contents Expand all
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Set Comparison Processor

Release: Juniper Apstra 5.1
{}
Change Release
date_range 21-Mar-25

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.
Enable Streaming (enable_streaming) Makes samples of output stages streamed if enabled. An optional boolean that defaults to False. If set to True, all output stages of this processor are streamed in the generic protobuf schema.


In the Add Processor window of the Apstra UI, hover over the "Set Comparison" tooltip for a visual example of how the Set Comparison processor functions.


Example: Set Comparison

Consider we have inputs with device temperature information.

Input A:

content_copy zoom_out_map
[system_id=leaf1]: 45
[system_id=leaf2]: 52
[system_id=leaf3]: 61

Input B:

content_copy zoom_out_map
[system_id=leaf2]: 52
[system_id=leaf4]: 64

Outputs will be the following.

A - B:

content_copy zoom_out_map
[system_id=leaf1]: 45
[system_id=leaf3]: 61

B - A:

content_copy zoom_out_map
[system_id=leaf4]: 64

A & B:

content_copy zoom_out_map
[system_id=leaf2]: 52
footer-navigation