Compare Datasets
The Compare Datasets node enables you to compare data from two input streams.
Node Parameters
- Specify which fields to compare. In Input A Field, enter the name of the field from input stream A. In Input B Field, enter the name of the field from input stream B.
- Optional: To compare multiple fields, select Add Fields to Match to configure additional comparisons.
- Configure how to handle differences between datasets. In When There Are Differences, select one of the following options:
- Use Input A Version to treat input stream A as the source of truth.
- Use Input B Version to treat input stream B as the source of truth.
- Use a Mix of Versions to use different inputs for different fields.
- Use Prefer to select either Input A Version or Input B Version as the primary source of truth.
- In For Everything Except, specify input fields that should be pulled from the alternative input source. To add multiple fields, use a comma-separated list.
- Include Both Versions to include both input streams in the output, which may result in a more complex structure.
- Configure Fuzzy Compare settings. When enabled, the comparison tolerates minor type differences between fields. For example, the number 3 and the string
3are treated as equivalent with Fuzzy Compare enabled, but are considered different when disabled.
Understanding Item Comparison
Item comparison follows a two-stage process:
- The node verifies whether the values of the selected comparison fields match across both inputs.
- If the comparison fields match, the node compares all fields within the items to determine whether the items are identical or different.
Node Options
Use the node Options to refine your comparison or adjust comparison behavior.
Fields to Skip Comparing
Specify field names to exclude from the comparison.
For example, when comparing the two datasets below using person.language as the Fields to Match, the node identifies them as different. If you add person.name to Fields to Skip Comparing, the node identifies them as matching.
json
// Input 1
[
{
"person": {
"name": "Stefan",
"language": "de"
}
},
{
"person": {
"name": "Jim",
"language": "en"
}
},
{
"person": {
"name": "Hans",
"language": "de"
}
}
]
// Input 2
[
{
"person": {
"name": "Sara",
"language": "de"
}
},
{
"person": {
"name": "Jane",
"language": "en"
}
},
{
"person": {
"name": "Harriet",
"language": "de"
}
}
]
Disable Dot Notation
Controls whether child fields can be referenced using parent.child syntax in field names. When enabled, dot notation is disallowed; when disabled (default), dot notation is allowed.
Multiple Matches
Specify how to handle duplicate data. The default setting is Include All Matches. Alternatively, you can select Include First Match Only.
For example, given these two datasets:
json
// Input 1
[
{
"fruit": {
"type": "apple",
"color": "red"
}
},
{
"fruit": {
"type": "apple",
"color": "red"
}
},
{
"fruit": {
"type": "banana",
"color": "yellow"
}
}
]
// Input 2
[
{
"fruit": {
"type": "apple",
"color": "red"
}
},
{
"fruit": {
"type": "apple",
"color": "red"
}
},
{
"fruit": {
"type": "banana",
"color": "yellow"
}
}
]
The node returns three items in the Same Branch tab, with identical data in both branches.
If you select Include First Match Only, the node returns two items in the Same Branch tab. The data remains identical in both branches, but only the first occurrence of matching "apple" items is returned.
Understanding the Output
The node provides four output branches:
- In A only Branch: Contains data that exists only in the first input.
- Same Branch: Contains data that is identical in both inputs.
- Different Branch: Contains data that differs between inputs.
- In B only Branch: Contains data that exists only in the second input.