> For the complete documentation index, see [llms.txt](https://doc.duaer.com/zh/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.duaer.com/zh/build/compare-datasets.md).

# 在 Duaer 里用 Compare Datasets 对比两路数据

在 Duaer 里，Compare Datasets 有 Input A 和 Input B 两个输入，四个输出：In A only、Same、Different、In B only。用 Fields to Match 配对。
## 按字段配对再比差异

1. 搜索 Compare Datasets。把两路节点分别接到 Input A 和 Input B。
2. 在 Fields to Match 里加一行：Input A Field 和 Input B Field，例如都填 id。
3. When There Are Differences 在新版本默认是 Include Both Versions。
4. 点执行此步骤。看四条输出分支上分别有哪些条目。

When There Are Differences 还可以是 Use Input A Version、Use Input B Version、Use a Mix of Versions。

Fuzzy Compare 打开后，数字 3 和字符串 3 会当成相同。汇合见 [在 Duaer 里用 Merge 汇合数据](/zh/flow-logic/merging.md)。
## Questions

### Duaer 的 Compare Datasets 和 Merge 有什么不同？

Compare Datasets 专为两路对比，输出四条差异分支。Merge 用来按模式拼合条目。要拼合时用 Merge；要找出只在一边或字段不同时用 Compare Datasets。

