Skip to main content

Compare Data

Enterprise

Compare Data module allows you to compare datasets between two sources and identify differences. This powerful feature helps you analyze data discrepancies between different environments, validate data migrations, or compare datasets from different sources.

This module can be accessed via Modules Menu -> Compare Data. You can also add this to your default tab layout via Custom Tab Layouts.

Here is the overview of the main screen.

Usage

Step 1: Select the Source and Target Data

App supports selecting data from either CSV or directly from Salesforce org via SOQL queries. You can mix and match different source types as needed.

For SOQL, enter the SOQL Query for Source side. If the target side is also SOQL, you can leave the target query blank to use the same query for both sides.

Step 2: Click on Compare button

The app will fetch the data from both source and target, identifies the best key field for matching records, compares the records, and shows the results in an interactive comparison view.

Step 3: Change the Key Field and Ignore Fields as needed

See the Key Field section below for more details on the key field.

You can also ignore specific fields from comparison if they are not relevant (like system fields, timestamps, etc.). Once ignored, those will be shown in the grid but not compared.

Step 4: Apply any filters to focus on specific differences

The app allows you to filter rows search for some row content or by change type (Added, Modified, Deleted, Same, Duplicate).

Step 5: Analyze and export the results

Analyze the records to identify any discrepancies. You can export the results to CSV or Excel for further analysis or reporting.

Key Field and comparison logic

Key Field is the field used to match records between source and target datasets. If Source is SOQL, then the app will pick the record "Name" field as the Key Field. For ex., Name or Title or Subject etc., If the source is not SOQL, then first field of the dataset will be picked.

Once the key field is identified, then the app will identify all records with the same key field value as a group. Each group will have one or more records from the source and one or more records from the target. Then it compares each and derives the change type as follows.

  • Duplicate: If Source or Target has multiple records with the same key field value, then those records will be marked as duplicate.
  • Added: If a group has records only in Source and none in Target, then those records will be marked as added.
  • Deleted: If a group has records only in Target and none in Source, then those records will be marked as deleted
  • Same: If a group has exactly one record in Source and one record in Target, and all fields are identical, then those records will be marked as same.
  • Modified: If a group has exactly one record in Source and one record in Target, but one or more fields are different, then those records will be marked as modified

Group# Field

Group is any set of records with the same key field value. Each group will have one or more records from the source and one or more records from the target. App will sort the records by the Key Field value and assigns group numbers as it goes through the data set. This group sequential number is shown as Grouop# column. All records within each group share the same group number.

Change Type Filter

Each time you compare the records, app will calculate how many records are added, modified, deleted, same, or duplicate and show that in the -Change Type- filter with counts. You can use this filter to focus on specific types of changes.

Change Stats

Once you run a comparison, the toolbar will show a summary of the results as shown below. Note that count represents the number of groups, not individual records. For example, if there are 3 source records and 2 target records with the same key field value, that will be counted as 1 group.

Limitations and Considerations

  • Large datasets may take longer to process or even hang up the browser
  • CSV comparison is limited by browser memory capabilities
  • Complex data types may require preprocessing for accurate comparison
  • Cross-org comparisons require active connections to both orgs
  • SOQL Query Comparison with the child query, compares only the main record and not child records

Presets

The Compare Data module supports saving and loading presets for frequently used comparison configurations. Use the Presets dropdown in the toolbar to:

  • Save the current configuration as a preset. It saves all the details except for the actual data.
  • Load previously saved configurations
  • Manage and organize your comparison templates

This feature is particularly useful for regular data validation processes or recurring comparison scenarios.