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
Source database type. Supported values:
mysql, postgres, oracle, sqlserver, singlestore.Path to a file containing the source database connection string.
Target database type. Supported values:
mysql, postgres, oracle, sqlserver, snowflake, firebolt, bigquery, databricks, spanner, singlestore.Path to a file containing the target database connection string.
Path to the Wirekite schema file (
.skt) generated by the Schema Extractor. Used to determine table structures, column types, and primary keys.Path to a file listing the tables to validate, one per line in
schema.table format.Optional Parameters
Path to the log output file. If not specified, output is written to stdout.
Schema mapping for source-to-target name differences. Format:
sourceSchema:targetSchema. Use commas for multiple mappings: schema1:mapped1,schema2:mapped2.Number of parallel validation threads. Defaults to 2x the number of CPU cores.
Number of rows per pagination window. The validator uses keyset pagination to compare large tables in chunks of this size.
When
true, stops validation immediately when any table has differences. When false, continues validating all tables and reports all differences at the end.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:Percentage of rows to validate (1-100). When set to 0 (default), all rows are validated.
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.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
Exit Codes
| Code | Meaning |
|---|---|
| 0 | All tables passed validation |
| 1 | One or more tables have differences or errors |
Comparison Behavior
TableValidator automatically handles common cross-database differences:| Category | Handling |
|---|---|
| Timestamps | Normalized to UTC for comparison |
| Floats | Compared with relative tolerance (1e-5) |
| Decimals | Arbitrary precision comparison for large numbers |
| CHAR padding | Trailing spaces trimmed |
| NULL vs empty | Configurable via emptyEqualsNull |
| JSON | Semantic equality (ignores formatting) |
| UUID | Case-insensitive comparison |
| Money | Currency symbol and separator normalization |
