Overview
The TableValidator tool compares data between source and target databases after a migration to verify accuracy. It performs row-by-row comparison using primary key ordering and reports missing rows, extra rows, and value differences.TableValidator handles database-specific differences automatically, including timestamp normalization, float precision tolerance, trailing space trimming, and NULL/empty string semantics.
Usage
TableValidator takes a configuration file as its only argument:key=value format as the orchestrator.
Required Parameters
string
required
Source database type. Supported values:
mysql, mariadb, postgres, oracle, sqlserver, singlestore. (mariadb is accepted as an alias and handled identically to mysql.)string
required
Path to a file containing the source database connection string.
string
required
Target database type. Supported values:
mysql, mariadb, postgres, oracle, sqlserver, snowflake, firebolt, bigquery, databricks, spanner, singlestore, mongodb. (mariadb is accepted as an alias and handled identically to mysql.)string
required
Path to a file containing the target database connection string.
string
required
Path to the Wirekite schema file (
.skt) generated by the Schema Extractor. Used to determine table structures, column types, and primary keys.string
required
Path to a file listing the tables to validate, one per line in
schema.table format.Optional Parameters
string
Path to the log output file. If not specified, output is written to stdout.
string
Schema mapping for source-to-target name differences. Format:
sourceSchema:targetSchema. Use commas for multiple mappings: schema1:mapped1,schema2:mapped2.integer
Number of parallel validation threads. Defaults to 2x the number of CPU cores.
string
Path to a GCP service account JSON credentials file. Required when validating against Spanner or BigQuery targets.
integer
default:"100000"
Number of rows per pagination window. The validator uses keyset pagination to compare large tables in chunks of this size.
boolean
default:"false"
When
true, stops validation immediately when any table has differences. When false, continues validating all tables and reports all differences at the end.boolean
default:"false"
When
true, treats empty strings and NULL values as equivalent. Useful when migrating from Oracle (which treats empty strings as NULL) to other databases.Partial Validation
For large databases, you can validate a random sample instead of all rows:integer
default:"0"
Percentage of rows to validate (1-100). When set to 0 (default), all rows are validated.
integer
default:"0"
Maximum number of rows to validate. When set to 0 (default), all rows are validated. If both
samplePercent and sampleRows are set, the smaller sample is used.boolean
default:"true"
When
true, randomly selects which windows to validate during partial validation. When false, validates windows sequentially from the beginning.Example Configuration
Partial Validation Example
Output
TableValidator reports results per table and provides a summary at the end.Per-Table Results
For each table, the validator reports:- Source and target row counts
- Number of rows missing in target
- Number of extra rows in target
- Number of rows with value differences
- Sample rows for each category (up to 10 examples)
Summary Report
The summary shows totals across all tables:- Total tables validated (passed, failed, errors)
- Total rows compared
- Total matches, missing, extra, and differences
