Validate data with the Validator
Validator compares one replicated entity with the table it is written to. This guide walks through a whole validation: run it, read the result, narrow it with filters, tell a real difference from a conversion artefact, handle the awkward cases (NULL, padding, floats, keys, rows that change while you compare) and fix and re-check the rows. Every result shown here was captured on a MySQL to PostgreSQL pipeline, so the type and date conversions are real.
In this guide
You will learn how to run a comparison, choose between Count only and a full comparison, read the counters, the notices and the grid, write a source and a target WHERE condition for each database, slice a big table by key range, see how filters interact with the entity filter and with column selection, understand how Validator normalizes dates, times and timestamps, avoid the false differences that some options create, handle NULL and empty text, trailing spaces, case, numbers, floats, binary columns, keys, duplicates and rows that change during the run, then reconcile and re-check.
Quick information
Goal |
Prove that a target table matches its source, and explain every difference that Validator reports |
Audience |
Gluesync users who replicate between two different databases and have to trust the result |
Level |
Intermediate |
Time required |
About 60 minutes |
Area |
Control Plane → Validator, and an entity’s Validate action |
Applies to |
Gluesync 2.3 |
Before you begin
Make sure that:
-
A pipeline has a source agent, a target agent and at least one entity whose target table already holds data. Both connectors must be able to compare data. See Supported connectors;
-
You can sign in to the Control Plane with a role that can view differences and, to fix them, reconcile;
-
You can run SQL on both databases, for example with Query Studio, so that you can confirm what Validator reports.
This guide uses a MySQL 8 source and a PostgreSQL 16 target, three entities and the names below. Replace them with your own.
| Entity | Content |
|---|---|
|
Key |
|
Key |
|
Text key |
|
Run the repair steps on a practice copy first. Reconcile writes to the target. |
Guide steps
UI
-
Open the entity’s overflow menu (three dots) in the pipeline and select Validate, or open Validator from the navigation and pick the pipeline and the entity. Validator opens in a new tab with the pipeline and entity already selected;
-
Select Validate. The Validator options dialog opens with three tabs: General, Columns & rules and Matching;
-
Leave the defaults and select Start validation.
The dialog keeps the choices of your last run until you reload the page, so a later run starts with them. Reload the page to go back to the defaults, or the next run will carry an option that you set for an earlier test.
For the meaning of every counter, status and error code, read What the results mean. This guide does not repeat those tables.
UI
A full comparison reads every row of both tables, in key order. Count only reads no row. It counts both tables and compares the two numbers.
-
Select Validate, switch Count only on (General tab, Scope) and select Start validation;
-
If the counts match, the run ends as Completed. If they differ, it ends as Completed with warnings. The message names both counts and their difference, and the summary shows Source rows, Target rows and More rows in source (or More rows in target). On
big_ordersthe message read:Source counts 20000 rows and target 19998 (difference 2): run a full comparison to find out which rows. The No differences found panel under it only says that no row was compared, so read the message and the counters; -
Run again without Count only to list the rows.
Equal counts do not mean equal data: a row missing on one side and an extra row on the other cancel out.
UI
Select a run in Run history and read the grid. The Source table is on the left, the Target table on the right, and a red bar marks the cells that differ.
Every row in the grid has a type: Source only, Target only, Differs, Extra in target, Duplicate key or NULL key. Only the columns that differ are filled. A source note of '' against a target NULL shows an empty cell on the left and null on the right.
Besides differences, a run reports notices. A notice says how a column was compared, or why it was not, and it is not a difference. You will meet these in this guide:
| Notice | What it tells you |
|---|---|
Compared at lower precision |
The two types cannot hold the same values, so the column is compared as strictly as the narrower side. For example |
Equal within tolerance |
Values that are equal only because the lenient profile ignores trailing spaces or line endings. The detail gives the number of values. |
Column skipped by an option |
An option of the run leaves the column out, for example Skip BLOB / CLOB columns. |
Transformed column compared raw |
A field function writes the column and the run did not replay it. |
Reader warning |
A text key is ordered with a forced binary collation, and the warning names an index that would speed the run up. |
See Notices for the full list. A run that finds only notices ends as Completed.
UI + SQL
Open Validate, then General → Advanced: query filters. Each side has its own WHERE condition and its own Key ordering expressions.
How the condition is used:
-
Validator adds it to its own query as
WHERE (your condition) AND (the key paging condition). You type only the condition. A leadingWHEREis accepted; -
The text is SQL of that database, not Gluesync syntax. Quote identifiers the way the database does: backticks on MySQL (
+`status= 'PAID'`), double quotes on PostgreSQL (`"status" = 'PAID'+`). Plain lower-case names work on both; -
A condition with a semicolon, a comment (
--) or unbalanced parentheses is refused, and the run ends as Failed with the messageSQL clauses must not contain comments or semicolonsorUnbalanced parentheses in SQL clause. A condition that names an unknown column fails the run with the message of the database, for exampleUnknown column 'nope' in 'where clause'.
The two sides are independent. Validator does not copy the source condition to the target.
=== Slice a big table by key range
Validator reads a table in one pass and does not split it. To compare a big table in parts, give both sides the same key range and run once per range:
-- source (MySQL) and target (PostgreSQL), same text on both sides
id BETWEEN 1 AND 5000
id BETWEEN 5001 AND 10000
id BETWEEN 10001 AND 15000
id BETWEEN 15001 AND 20000
On big_orders the four runs reported, in turn: 1 source-only row, 1 row that differs, 1 source-only row together with 1 row that differs, and a clean slice. Each run lists only its own range, so a slice is the unit you fix and re-check. Use a range on an indexed column, normally the key. Date ranges work too: created >= '2026-01-10' AND created < '2026-01-11' returned 1,917 rows on each side.
=== Keep the two conditions equal
A condition on one side only is the most common source of a flood of differences. With id ⇐ 5000 on the source and nothing on the target, the run compared 5,000 source rows with the target rows and stopped with the message Stopped after 10000 differences: rows after that point were not compared, because 9,999 rows were Target only.
A condition on a column that has drifted hides the row instead of reporting it. With status = 'PAID' on both sides, a row whose target status had changed to another value was absent from the target slice, so it showed as Source only, not as a different value. Filter on the key or on a column that never changes.
=== How the conditions interact with the entity filter
-
The entity’s target filter is replayed by default (Apply the entity filter on the Matching tab). A source row that the filter excludes is expected to be absent from the target and is not a difference. A target row that the filter would not have written is reported as Extra in target. In the example, a target filter
status = 'PAID'was added after the data was copied. The run withid ⇐ 300on both sides reported 150 Extra in target rows, and with the option off it reported none. Reconcile deletes such rows only when you tick Delete target rows the entity filter excludes on the General tab. See Filter rows with a snapshot WHERE clause and target filters; -
Your
WHEREconditions and the entity filter apply together. The first limits the rows read, the second decides which of them the pipeline would have written.
=== Include or exclude columns
Columns & rules lists every column with a checkbox on the left. Key columns are always compared. Clear a column to leave it out. With name cleared, the carol against Carol difference of the example was no longer reported. Use this to skip a column that you know differs on purpose, for example one that the target database fills. Reset to pipeline mapping restores the mapping of the entity. The target column of each row has a drop-down, so a column with a different target name can be mapped for this validation only.
UI + SQL
Validator does not compare the text of two date values. Each side is read as its type, brought to a common form and compared by value.
| Situation | What Validator does |
|---|---|
Two timestamps with different fractional digits ( |
Compares at the digits the target keeps. A notice says |
A value that the target rounded across midnight |
Equal by default. |
|
Compared as instants, and the notice says so. A target value one hour or two hours away from the source is a real difference. |
A date held as text |
Compared by its instant when the text reads as a date. A column written by a field function is replayed first (see below). |
=== Choose how to match
Open Validator options → Columns & rules → Date & time. The choice applies to every date and time column of the run:
| Choice | Use it when |
|---|---|
Normalize to UTC (recommended) |
Default. Instants are compared at the precision both sides keep. |
Exact match |
You want values compared as stored, without converting them to UTC. |
Ignore fractions of a second |
One side drops the fraction. See the warning below. |
Ignore time, compare date only |
Only the date matters. See the warning below. |
Ignore date and time columns |
You do not want date columns compared. In the example it also left out the |
On the Matching tab, Temporal precision sets the finest time unit compared (Nanoseconds, Microseconds, Milliseconds or Seconds).
|
Two choices create false differences when the target rounds. With Ignore fractions of a second the run truncated |
=== A time zone shift
By default, two timestamps hours apart differ, even in the lenient profile: Validator has to catch a shifted clock. On the example rows, 09:00 against 10:00 and 09:00 against 11:00 were reported as differences.
Tick Tolerate a whole time zone shift on the Matching tab to treat two timestamps that are a zone offset apart as equal. With it on, those two rows were no longer reported.
|
The option cannot tell a zone shift from a wrong hour. A row that is really one hour off is hidden too. Use it to diagnose a zone problem, then fix the zone and switch it off. |
=== Dates written by a field function
When a field function such as Convert Date to String writes the target column, comparing the raw source value would report a difference on every row. Validator replays the built-in functions by default (Apply the field functions on the Matching tab, under Pipeline transformations).
In the example, a DATE column was written to a varchar column with the pattern dd/MM/yyyy:
-
Default run: Completed, no difference;
-
A target value changed to
03/01/2026(day and month swapped): one row that differs. The source side shows the value the pipeline would have written,01/03/2026, and the target side03/01/2026; -
The same entity with the option off: every row differed, and a notice, Transformed column compared raw, said the column was
written by Convert Date to String, which this run did not replay.
For columns whose target value cannot be predicted, because it is written by the clock or by the target database, choose in Columns whose target value cannot be predicted between Leave them out and say so, Compare the raw values anyway and Refuse the run.
UI
Text columns are compared exactly unless the run is told otherwise, with these exceptions.
=== NULL against an empty string
NULL and '' are different values. On the example, a source '' against a target NULL was reported as a difference.
NULL and empty text on the Matching tab has three values:
-
Automatic (when a database stores '' as NULL): the default. A MySQL to PostgreSQL pair never equates the two, and the example row was reported;
-
Always equal: removed the
''againstNULLdifference in the example; -
Never equal: reports it for every pair.
=== Trailing spaces and line endings
The lenient profile treats two character values as equal when they differ only by trailing spaces or by \r\n against \n. The column gets an Equal within tolerance notice with the number of values. A source trail␠␠ against a target trail, and line1\r\nline2 against line1\nline2, were both equal, and reported as notices.
The strict profile (Matching → Comparison profile → Strict) reports them as differences. On the example it listed the trailing-space value and the line-ending value as well.
=== Case and surrounding whitespace
Case matters by default: carol against Carol is a difference. On Columns & rules, Trim surrounding whitespace and Ignore letter case are in the Value rules group. With Ignore letter case on, the carol against Carol difference was removed.
UI + SQL
-
A target column with a smaller scale is compared at that scale and the run says so with a Compared at lower precision notice. On the example,
99.9950stored as100.00and0.0049stored as0.00were equal.10.5against10.51was a difference, because the value really changed at the column’s scale; -
A float is compared within the noise of its width in the lenient profile, a relative
1e-6.21.21stored in arealcolumn and read back as21.209999was equal; -
A larger gap stays a difference.
3.14159against3.1416is a relative difference of about6e-6, and the default run reported it. Set Float relative tolerance (|a − b| / max(|a|, |b|)) to0.0001on the Matching tab and it was no longer reported. Float absolute tolerance (|a − b|) covers values near zero, where a relative tolerance says nothing.0means exact.
UI
On Columns & rules, Skip BLOB / CLOB columns and Skip byte-array columns are on by default. A skipped column gets a Column skipped by an option notice naming the option, so that a clean run does not read as a check of a column that was never compared.
-
Clear both options to compare those columns. On the example, a MySQL
BLOBthat readDEADBEEFon the source and00FEon the target was reported with both values in Base64. Clearing only Skip BLOB / CLOB columns left the column skipped; -
Keep them on for big tables.
A TEXT column was compared with the options on, so what is skipped follows the type that the connector reports, not the word text.
UI
Validator matches rows by key. It reads both tables in key order and walks them together, so the key decides everything. The key columns are marked in the Key column of Columns & rules, and they start from the primary key of the entity.
-
Key order. A text key is ordered with a forced binary collation on both sides. Each such run carries a Reader warning notice that names an index that makes the run faster. On the example
text_keysentity, with the two keysa1andA1, the run ended as Completed with that notice, and the two keys were two rows; -
Key types. Both sides need the same kind of key. With the key
id(a number) mapped to a text column on the target, the run failed withSchemaIncompatibleand a message that asks you to align the types, choose another key or give a Key ordering expression for each side; -
Duplicate keys. If the target has the same key twice, Validator reports Duplicate key. In the example, a second
a1was added to a target table without a primary key: the run counted one duplicate. Remove the extra row yourself. Tick Validate key uniqueness (Columns & rules) to fail the run at once (DuplicateComparisonKey) instead; -
NULL keys. The default is to refuse the run with
NullComparisonKey. NULL key values on the Matching tab can sort `NULL`s first or last. With Sort NULLs first, the row was reported as NULL key; -
No key. The entity needs a primary key or a logical key. See Choose keys for tables without a primary key.
UI
A running pipeline keeps writing, so a row can differ for a moment. Validator guards against this in two ways.
-
Re-verify. After the scan, each difference is read again by key on both sides. A difference that is gone is discarded and counted in Transient, discarded. Re-verify differences before reporting them is on by default (Matching tab, with a batch size of 500 and no delay);
-
Run again. Re-verify reads once, right after the scan, so it cannot absorb a lag longer than that. In the example, every row of
big_orderswas updated on the source and a run started at once. It stopped at the difference limit, because the updates had not reached the target yet. A run after CDC had delivered them was clean.
For an exact answer, pause the entity, run, and start it again. See Start, pause and restart an entity. A difference that stays across two runs a minute apart is real.
UI
-
Run Count only first;
-
Slice the table with a key range on both sides (see the filter step);
-
Raise Max runtime (seconds) (General → Limits, 3600 by default) before the first full run. A run that goes past it ends as Failed, and in the example the message was
Statement cancelled due to client request. The rows scanned so far are not a result; -
Index the key columns. The Reader warning notice names an index for a text key;
-
Do not start two runs of one entity. The second is refused with
A data comparison job is already running for entity …. Select Cancel run to stop the first. A run cancelled while the database was reading ended as Failed too.
Max differences (default 10,000) stops a run that finds more, with the message Stopped after <n> differences: rows after that point were not compared. Fix the first batch, or correct a filter that is not the same on both sides, and run again. Max rows in results grid (default 10,000) caps what the page loads.
See Sizing for big tables for the limits.
UI
-
Tick the rows to fix in the grid, or select Select all, then select Reconcile in the page header. A dialog asks
Reconcile 4 differences?and says that the target changes cannot be undone from here. Select Reconcile to confirm. The three Operations allowed when reconciling (General tab: insert rows missing in the target, delete rows missing in the source, update rows with mismatched values) decide what it may do. Write predicted values to columns the pipeline transforms is off by default; -
A message reports the result. On the example it read
Reconciliation completed. Inserted: 2, deleted: 0, updated: 2, skipped: 0, already in sync: 0.Reconcile writes the source value to the target; -
Start a new run. The counters of the old run clear after a reconcile, but its status does not change, so only a new run tells you the table is in sync.
In Run history, every run of the entity is listed with its status and counters. Select one to read it again.
UI
A Validate action can run on a schedule. See Schedule validation and Automate pipeline actions with schedules, chained events, and webhooks for how to set it up and what a scheduled run does with differences.
Troubleshooting
| Problem | Possible cause | What to do |
|---|---|---|
Thousands of Target only rows and |
A |
Put the same condition on both sides, or on neither |
A row is Source only although it exists on the target |
A filter on a column that changed on the target |
Filter on the key, and compare the rows in SQL |
Rows that differ lists timestamps that are one second or one day apart |
Ignore fractions of a second or Ignore time, compare date only against a target that rounds |
Go back to Normalize to UTC. See the date and time step |
Timestamps differ by whole hours |
The two databases or sessions use different time zones, or the data is wrong |
Tick Tolerate a whole time zone shift to confirm, then fix the zone and clear it |
|
The target stores an empty string as |
Set NULL and empty text to Always equal if the pipeline is meant to do that |
A text value differs only by case |
A target with a case-insensitive collation or a normalizing UDF |
Tick Ignore letter case for non-key columns |
A float differs in the fifth digit |
A 32-bit target column |
Set Float relative tolerance to the precision the column keeps |
A clean run that did not look at a column |
A Column skipped by an option notice, or a column cleared in Columns & rules |
Read the notices, and clear Skip BLOB / CLOB columns and Skip byte-array columns |
Run fails with |
A |
Change the key, or set NULL key values to sort `NULL`s first or last |
Run fails with |
The key has different types on the two sides |
Align the types, or give a key ordering expression for each side |
|
A second run for the same entity |
Wait, or select Cancel run |
Run fails with |
The run passed Max runtime (seconds), or you selected Cancel run |
Raise the limit, or slice the table with key ranges |
|
The |
Fix the column name, quote it for that database, and remove the semicolon or the comment |
Related guides
Contact MOLO17 Support if you need assistance with Validator.