Query Diff Documentation
Overview
Query Diff in DataDios helps you validate data after migration by comparing query results from your source and target systems. This ensures that your data has been migrated accurately and consistently.
Stages of Query Diff
- Locate Query Diff in DataDios
- Create or import the required Data Sources
- Define and select Key Columns for verification
- Process the data sources
- View summary and compare differences
Steps to Perform Query Diff
Step 1: Navigate to Query Diff
-
Go to the Smart Diff tab in DataDios
-
Click on Query Diff

-
Click Create Diff → This will open the Source and Target Data Source Selection page
On this page, you can:
-
Switch from Datasource Diff (default) to Query Diff
-

-
Define your workflow name or diff job name
-
Add a description
-
Select Source and Target Data Sources

Step 2: Add Queries
-
Select your data sources and click Next
-
Add queries for both Source and Target
Ensure queries are validated before adding
-
Click Next

Step 3: Analyse Step
-
The Analyse step automatically maps matching columns between queries
-
Review the mapping
-
Select the Key Columns to be used in comparison

Step 4: Execute Stage
-
Select the Key Columns that may differ across the two data sources
-
(Optional) Schedule your workflow by clicking Schedule Workflow
-
Click Next to start execution and view diff results

Step 5: Diff Summary
-
Wait for the diff process to complete (time varies by dataset size)
-
Once complete, review the Diff Overview

-
Click View Diff to explore detailed differences
Types of Diffs:
-
Metadata Diff Shows differences between the structure (columns) of your queries

-
Data Diff Shows row-level differences in query results

Best Practices
- Create Data Sources first: Always configure and test your source and target before running Query Diff
- Validate queries: Ensure SQL queries are correct and return expected results
- Choose Key Columns wisely: These should uniquely identify rows to ensure accurate comparison
- Use scheduling(if Required): Automate query diff execution for repeated validation tasks