Skip to main content
On this page, you run a reconciliation on your own machine. You see it report a mismatch, and you narrow the mismatch down to the two rows that cause it. The walkthrough uses a self-contained dataset, so you need no warehouse and no credentials. At the end, a small change points it at your own databases.

Install the CLI

To update, run brew upgrade synq-recon. Homebrew is for macOS only. See Command-line tools for the other ways to install.
Every published binary runs DuckDB, which is what the walkthrough below uses so it needs no warehouse and no credentials.
Check that it runs:

Sign in

You must sign in only to save suites to your workspace or to start backend runs. A local run needs no Coalesce Quality credentials.
auth whoami prints the workspace of your credential. Always read that line. It is the only thing that decides which workspace a command writes to.

Describe what to compare

A suite is a YAML file that holds the connections and the reconciliations. Save this as quickstart.yaml:
quickstart.yaml
That first line points your editor at the published JSON schema, which gives you completion and inline validation for every field. Keep it at the top of every suite you write.
The bisection block is tuned small here so the drill-down has something to do on a thousand rows. On real tables the defaults are the right starting point.

Validate before you run

This costs nothing and touches no database. Add --db to also connect, run every query through the database’s planner, and report table sizes, indexes and a suggested key column:
--db does not run the setup: SQL of the suite, so for this walkthrough it reports that app_orders does not exist. This is expected. The setup SQL makes the tables when the reconciliation runs.

Compare

Two queries, one per side, tell you that the datasets do not agree. If they agreed, this would be the full run.
The command exits 1. For a comparison, a non-zero exit means “differences found”, which is a result rather than a failure. Exit codes has the full list.
--no-report keeps the run entirely local. Without it, a run reports its results to your workspace whenever it can find a credential, so they show up in the app alongside backend runs.

Locate the difference

Read that from the top. The whole dataset disagrees, so it is split into ten segments; eight of them match on the first comparison and are never looked at again. The two that differ get split again, and the run stops with two ten-row windows to inspect. Look at the shape of each finding. The segment around order 384 has one row less on the target: a row is missing. The segment around order 617 has the same count but a different checksum: a value changed. You did not read a row value yet.
The drill-down compared 33 segments with 17 queries, and found two bad rows in a thousand. The saving grows with the table, because the number of queries grows with the logarithm of the row count, not with the row count. This is the purpose of the drill-down.

Get the rows

Every mismatch leaf comes with ready-to-run SQL for both sides:
Run these queries on the two databases to see the rows. This is the first time that row values are read: by you, in your SQL client, for ten rows and not for a million.
Redirect logs with 2>/dev/null, never 2>&1. Logs go to stderr and results to stdout; merging them makes -o json unparseable.

Point it at your own databases

Swap the connections: block for the real thing, drop the setup: block, and name your tables. Nothing else changes:
suite.yaml
Then run the same four commands. Two things to do before you trust the result:
  1. Keep the credentials out of the file. Move the connections: block to a git-ignored .connections.yaml. The CLI finds it automatically. See keep credentials out of the suite.
  2. Run check-config --db. It checks every connection and query, and warns if your key column has no index. Without an index, a drill-down can take minutes and not seconds.

Next steps

Authoring suites

Datasets, column selection, key columns, and the validation loop in full.

Time windows and cutoffs

Comparing two live systems? Read this before you trust a mismatch.

Workspace suites

Save the suite, start a backend run, put it on a schedule.

CLI reference

Every command, argument and flag, generated from the CLI itself.