verify_migration_counts
Verify record counts match across source, staging, and target tables to confirm no data loss or duplication during migration.
Instructions
Verify that record counts match across all three layers of a migration: Source (Jira / Salesforce) → Staging table → Target table
Checks: - How many records exist in the source - How many rows landed in the staging table - How many records were created in the target table - Whether staging count matches source (no records lost in transit) - Whether target count matches staging (no records lost in transform) - Whether there are MORE records in staging or target than in source (duplicates)
Use this after a full migration to confirm data integrity. Also useful after a test migration to see how many records were actually moved.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| platform | Yes | Source platform (salesforce, jira, or any registered connector) | |
| object_name | Yes | Comma-separated Jira project keys or Salesforce object name (e.g. "EMAL,KAN" or "Account") | |
| staging_table | Yes | Staging table name (e.g. u_stg_jira_kan) | |
| target_table | Yes | ServiceNow target table (e.g. incident, problem, change_request) | |
| project_field | No | Staging/target field that holds the project key for scoped queries (e.g. u_jira_project). Leave blank to count all rows. | |
| filter | No | Optional JQL (Jira) or SOQL WHERE clause (Salesforce) to scope the source count |