> For the complete documentation index, see [llms.txt](https://docs.upriverdata.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.upriverdata.com/product-usage/profile-diff.md).

# Profile Diff

## Overview

Easily compare data profiles across sources to ensure consistency throughout your pipeline or between different environments.

By leveraging intelligent profiling techniques, this approach enables you to confidently manage and synchronize data integrity throughout your entire data pipeline, ensuring that data remains consistent and reliable whether you're comparing production and staging environments, undertaking database migrations, or simply verifying that different data sources align seamlessly with your expected data behavior.

## Compare data sources

Select the `Profile Diff` tab - this can be either from the left side menu or from the tab inside a specific data source.

Once the tab is open, a view allowing you to select two different sources and times appears on the screen.

<figure><img src="https://875415170-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLE0zsJmUpeLjYw085cnO%2Fuploads%2FPbTO5QB3ZwZZBOOTLhGy%2Fimage.png?alt=media&amp;token=c4df8670-99cb-4805-aca0-22a2f0dec922" alt=""><figcaption><p>Profile diff before selecting data sources and times</p></figcaption></figure>

{% hint style="info" %}
Choosing `Profile Diff` from within a specific data source page automatically selects it for comparison.
{% endhint %}

Use the selection drop downs to choose the data sources that will be compares as well as the time for comparison. The times presented are the times in which a data contract was updated for a specific data source.

Notice - data sources created from pivot fields are also presented in the view and can be compared like any regular data source.

<figure><img src="https://875415170-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLE0zsJmUpeLjYw085cnO%2Fuploads%2FKuWLk0wGowE8pQ0zqKxG%2Fimage.png?alt=media&amp;token=1951d834-df60-4df9-a3ce-4f1795ffc176" alt=""><figcaption><p>Data source selection including "derived" data sources created by pivots.</p></figcaption></figure>

Once both data sources and dates are selected, a "diff" view for the two profiles is displayed. This view includes both the metadata metrics (freshness and volume) as well as a smart comparison generated for each of the fields based on the field profiles.

<figure><img src="https://875415170-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLE0zsJmUpeLjYw085cnO%2Fuploads%2FK9TSoMeWHN9Ui1ehcehQ%2Fimage.png?alt=media&amp;token=018d1b49-1c6c-465f-840a-25ef9f224600" alt=""><figcaption><p>Profile diff between two data source in staging and production</p></figcaption></figure>

For each of the monitored metrics, a comparison between the two data sources is created. If the profiles for a metric don't match for the two data sources, it is marked in red.

<figure><img src="https://875415170-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLE0zsJmUpeLjYw085cnO%2Fuploads%2F14MbFpB5VK8f8uin7mJU%2Fimage.png?alt=media&amp;token=ac525081-9534-4481-a4fe-fd3f17aa1eb9" alt=""><figcaption><p>Compared metrics for numeric fields with high cardinality</p></figcaption></figure>

Clicking on any of the compared metric will open a graph showing the profiles over time with a clear comparison. This comparison can be viewed as a unified graph or as two separate graphs.

<figure><img src="https://875415170-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLE0zsJmUpeLjYw085cnO%2Fuploads%2FlI8Q2xABFmhfSEWz0Kb4%2Fimage.png?alt=media&amp;token=97088b48-e4ec-436d-abda-40e1f025ab67" alt=""><figcaption><p>Profile comparison for a specific field</p></figcaption></figure>
