In-depth practical guides

Check a join before combining two files

Measure empty keys, duplicates, unmatched rows and row multiplication before publishing linked data.

Updated :

Reports and charts on a data review desk. Illustrative scene with no real data.

Reports and charts on a data review desk. Illustrative scene with no real data.

Does the join preserve what a row means?

A technically successful join can distort a total. The cause is often the grain: one file describes businesses, the other establishments or periods. Two occurrences on the left and three on the right produce six associations for one key. Check the join before calculating sums or rates.

  1. Define grain and contract

    State what one row represents in each file, the period and expected cardinality: one-to-one or many-to-one. If the right file has multiple periods, add period to the key or filter it explicitly.

  2. Preserve identifiers

    Load codes and references as text. Keep leading zeros, case and spaces unless a normalization rule is justified. A failed exact match requires investigation, not an automatic fuzzy merge.

  3. Inspect keys

    Count empty keys, groups of repeated keys and unmatched rows. A repeated key may be legitimate at a finer grain. Decide whether to retain a version, aggregate or expand the key before deduplication.

  4. Compare volumes

    Calculate expected inner and left join row counts. Then check counts and sums before and after; an increase is acceptable only if the grain change is intended and documented.

Check two CSV files

Calculated in your browser. Files and entered values are not sent to the server. UTF-8 CSV: maximum 2 MB and 10,000 data rows per file.

Ready to calculate.

Exact case- and space-sensitive matching; empty keys do not match. Unmatched rows include empty keys. No merged file is produced.

Situations and decisions

Typical situations for preparing a check. They do not describe completed assignments or actual observations.

Two rows meet three

A key occurring twice on the left and three times on the right generates six inner join rows. For an intended many-to-one relationship, correct the right file or refine the key first.

Identifier with a leading zero

00123 and 123 remain distinct in this tool. If a spreadsheet removed a zero, return to the source and dictionary; padding without knowing the format can create a false match.

Record to retain

  • File names and versions; grain, key and period on each side.
  • Normalization rules, treatment of empty keys and duplicates.
  • Before/after counts, unmatched rows and validation decision.

Official references

Related source profiles

Related protocols

Checks before reaching a conclusion

  • Is the right table unique on the key for a many-to-one relationship?
  • Are unmatched rows examined before being treated as zeros?
  • Is the total calculated at the same grain before and after?

Frequently asked questions

Should every duplicate be removed?

No. First determine whether rows describe different establishments, dates or versions. Arbitrary removal can lose legitimate data.

Why not match names automatically?

A name may change or be shared. Fuzzy matching generates candidates to review, not demonstrated identity.