Compare Datasets
Compare two arrays of items to find entries unique to each dataset or present in both.
The Compare Datasets node takes two arrays and classifies every item as existing only in A, only in B, or in both. It is useful for sync operations, diff reports, and reconciliation workflows.
Configuration
| Field | Type | Required | Description |
|---|---|---|---|
| inputAPath | string | Yes | Variable path to the first array (e.g., {{httpRequest_1.body.items}}). |
| inputBPath | string | Yes | Variable path to the second array (e.g., {{httpRequest_2.body.items}}). |
| compareFields | string[] | Yes | Field names used to match items between the two datasets (e.g., id, email). |
| fuzzy | boolean | No | When enabled, comparison is case-insensitive and values are trimmed of whitespace. Defaults to false. |
How Matching Works
Items are matched by computing a composite key from the compareFields values. If two items from A and B produce the same key, they are considered a match. When multiple items in B share the same key, each is paired with the matching A item.
Output
The node produces a single output containing three arrays.
| Field | Type | Description |
|---|---|---|
| onlyA | array | Items found in A but not in B. |
| onlyB | array | Items found in B but not in A. |
| both | array | Matched pairs. Each entry is an object with a and b properties containing the matched items from each dataset. |
| totalA | number | Total number of items in input A. |
| totalB | number | Total number of items in input B. |
| matchCount | number | Number of matched pairs. |
Example
Compare a CRM contact list against a mailing-list export to find contacts missing from the mailing list.
Input A: {{httpRequest_1.body.contacts}}
Input B: {{httpRequest_2.body.subscribers}}
Compare Fields: ["email"]
Fuzzy Match: onAfter execution:
onlyAcontains CRM contacts not on the mailing list.onlyBcontains mailing-list subscribers not in the CRM.bothcontains matched pairs with the full record from each source.