Docs
Browse Docs
Field guide · Duplicates

Exact duplicate rows

The same row appears more than once, identical in every column.

What it looks like

Before
order_idcustomeramount
1001Ana Ruiz40.00
1001Ana Ruiz40.00
1002Ben Cho15.00
1003Ben Cho15.00
After
order_idcustomeramount
1001Ana Ruiz40.00
1002Ben Cho15.00
1003Ben Cho15.00
Order 1001 was recorded twice and one copy is removed. Orders 1002 and 1003 look alike but have different IDs, so both are real.

How it happens

  • A file was loaded twice, or the same export was appended to itself.
  • A join to another table matched more than one row and multiplied the results.
  • A form was submitted twice after a slow response.

What it breaks

  • Totals and counts are too high by exactly the duplicated amount.
  • Loading into a table that requires unique keys fails partway through.
  • People are contacted, billed, or shipped to twice.

How to spot it

  • Compare the number of rows with the number of distinct rows.
  • Group by the column that should be unique and list any value that occurs more than once.
  • Check whether duplicates arrive in blocks. A whole block repeated points to a double load.

How to fix it

  • Decide first whether identical rows can be legitimate. Two identical rows can be two real purchases, and without an order ID there is nothing to tell them apart.
  • Where a unique key exists, keep one row per key and remove the identical copies.
  • Record how many rows were removed, and find the step that created them so it does not happen on the next load.

TermsDeduplication, Duplicate, Uniqueness, Primary key

Karg checks for many of these when it profiles a file, applies the fixes it is confident about, and sets the rest aside for your review. See how it works, or have our team clean your data for you.