/ Migrations / Validation
Docs/Migrations/Validation

Validation

Before you cut over, prove the target holds what the source holds. A validation run compares the two and saves the result as a report you can export or share.

What is checked

  • Row count. The number of documents in the source collection versus rows in the target table.
  • Sampled checksums. 100 rows are taken from the target in primary-key order, the matching source documents are fetched, and every mapped field is compared value by value. Up to 50 mismatches are listed, each with the primary key and the fields that differ.

Checksum sampling is available when the source is MongoDB, DynamoDB, Firestore or Cosmos DB and the target is PostgreSQL, MySQL, MariaDB or Redshift. Other combinations get a row-count comparison only.

Verdicts

VerdictMeaning
passedCounts match and every sampled row matches.
failedCounts differ, or at least one sampled row differs.
incompleteNothing failed, but a check couldn't run — for example the source only offers an approximate count, or checksums aren't supported for this pair. The report explains which.
✓
Validating a live sync

While a live sync is streaming, counts can differ by the handful of changes still in flight. Validate when lag is near zero, or briefly pause writes to the source for a clean comparison.

Running a validation

Click Validate on a migration, or:

curl -X POST https://nosqlsync.com/engine/migrations/$MIGRATION_ID/validate \
  -H "Authorization: Bearer $NOSQLSYNC_API_KEY"
Response (abridged)
{
  "sourceCount": 1284211,
  "sourceCountApproximate": false,
  "targetCount": 1284211,
  "countMatch": true,
  "checksumSupported": true,
  "sampled": 100,
  "mismatches": [],
  "checkedAt": "2026-10-31T09:12:44.000Z",
  "runId": "7c0e…"
}

Each run is stored as an immutable snapshot. List them with GET /migrations/:id/validation-runs.

Exporting and sharing reports

  • Export — GET /validation-runs/:runId/export?format=md (Markdown, the default) or format=json.
  • Share — POST /validation-runs/:runId/share returns a read-only link (/reports/…) anyone can open without an account. Useful for sign-off from people outside your workspace.
  • Revoke — DELETE /validation-runs/:runId/share disables the link immediately.
!

Share links don't expire on their own. Revoke them when the review is done. Only owners and admins can create or revoke them.