Running a Reconciliation
A reconciliation job compares data between two connections. This guide shows you how to create and run one.
Prerequisites
Section titled “Prerequisites”- At least two connections configured in your workspace.
- Queries that return comparable result sets from each source.
Create a reconciliation job
Section titled “Create a reconciliation job”- Go to Jobs in the sidebar and click New Job.
- Select the source and target connections.
- Enter the SQL query for each side.
- Configure the key columns — the columns used to match rows across sources.
- Click Save.
datarecs job create \ --name "daily-balance-check" \ --source-connection production-mysql \ --source-query "SELECT id, balance FROM accounts" \ --target-connection warehouse-postgres \ --target-query "SELECT id, balance FROM accounts_snapshot" \ --key-columns idcurl -X POST https://api.datarecs.com/v1/jobs \ -H "Authorization: Bearer $DATARECS_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "daily-balance-check", "sourceConnectionId": "conn_abc123", "sourceQuery": "SELECT id, balance FROM accounts", "targetConnectionId": "conn_def456", "targetQuery": "SELECT id, balance FROM accounts_snapshot", "keyColumns": ["id"] }'Run the job
Section titled “Run the job”Open the job and click Run Now. Progress is shown in real time.
datarecs job run --name "daily-balance-check"curl -X POST https://api.datarecs.com/v1/jobs/job_xyz789/run \ -H "Authorization: Bearer $DATARECS_API_KEY"Understanding results
Section titled “Understanding results”After a run completes, results are categorised as:
| Category | Meaning |
|---|---|
| Match | Row exists in both sources with identical values. |
| Missing in source | Row exists in target but not in source. |
| Missing in target | Row exists in source but not in target. |
| Mismatch | Row exists in both but one or more column values differ. |