> For the complete documentation index, see [llms.txt](https://docs.telm.ai/telmai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.telm.ai/telmai/profiling-data/data-diff.md). Agents can also search and read this documentation through its [MCP server](https://docs.telm.ai/telmai/~gitbook/mcp).

# Data Comparison

Use Data comparison to compare an asset with another asset and find the records that differ.

Telmai can compare an asset with another asset, for example a source table and the copy you load from it. Use it for data reconciliation and migrations, to make sure two tables stay consistent.

The comparison runs as part of the target asset's regular scans. Telmai counts new, missing and changed records and raises a **Data Difference** alert when the two assets differ. It also writes the changed records, as JSON or Parquet files, to a bucket you choose, so you can analyze each change.

## Set up a comparison

1. [Connect](https://docs.telm.ai/telmai/connect-to-data.md) both assets to Telmai.
2. Open the asset you want to check (the target) from **Assets**, and make sure it has [ID attributes](https://docs.telm.ai/telmai/connect-to-data/configuring-a-data-source.md#id-attribute). Telmai matches records between the two assets by ID.
3. On the asset's **Overview** tab, find **Data comparison** in the **Remediation & actions** card and click **Set up comparison**. The button is disabled until the asset has an ID attribute.
4. In **Data comparison settings**, under **Compare … against following**, choose the **Asset** to compare with.
5. Under **Results Destination**, choose the **Bucket type** (**Amazon S3**, **Google Cloud Storage** or **Azure File**) and fill in its credentials, the **Bucket** and the **Path** for the result files.
6. Choose the **Output format**: **JSON** or **PARQUET**.
7. Click **Save**.

<figure><img src="https://604868671-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkO3-a8YVu1iq1jP__S%2Fuploads%2Fgit-blob-3f0f0a613468c986b54978985f337d47088d7c42%2Fdata-comparison-settings-2026-11-04.png?alt=media" alt="The Data comparison settings dialog with the Asset to compare, the Results Destination for Amazon S3 and the Output format" width="640"><figcaption><p>Set up a data comparison.</p></figcaption></figure>

The next scan of the target asset compares the two assets. Once set up, the **Data comparison** row on the **Overview** tab shows the compared asset and the results destination, with **Edit** to change them.

{% hint style="info" %}
Data comparison isn't available for assets in a group.
{% endhint %}

## Review the differences

When the assets differ, the scan raises a **Data Difference** alert. Find the alert in the asset's **Profiling** tab under [Alerts](https://docs.telm.ai/telmai/monitoring-data/data-trends-and-alerts.md), and the matching incident in [Incidents](https://docs.telm.ai/telmai/monitoring-data/incident-portal.md). Open the alert or incident for the changes in schema and the counts of new, missing and changed records.

For the individual changes to each record, open the result files in the results destination.
