First decide the grain of each table
An order row and an item row represent different things. Joining them can be correct for looking up an order attribute on each item, while making the order total unsafe to add across those item rows. Use this preview before replacing an existing report or accepting a new merge. It reads your pasted CSV or a file you choose locally in this tab; private files are not uploaded.
Write down what one row means on each side, the exact matching columns, the expected relationship, and one comparable amount basis. An order identifier that repeats across outlets needs an outlet component too. A matching key is evidence of string equality, not proof that the records describe the same business event. For uncertain identity, use the identity-resolution guide; for effective-dated costs, use point-in-time joins.
- Identify the row grain and exact composite key on both sides.
- Count left and right occurrences of each nonblank key.
- Compare frequencies with the declared relationship; inspect unmatched rows.
- Predict pairs and check the amount bridge before accepting a merge downstream.
A three-order example you can audit by hand
The following records are constructed teaching data, not restaurant evidence. The left table holds O1 = 100.00, O2 = 200.00 and O3 = 300.00 fictional INR. The right table has I1 and I2 for O1 and I3 for O2. The source left total is 100 + 200 + 300 = 600.00. Choose one to many: order keys should be unique on the left, while multiple items may share an order on the right.
| Left order | Right item | Repeated left amount |
|---|---|---|
| O1 | I1 | 100.00 |
| O1 | I2 | 100.00 |
| O2 | I3 | 200.00 |
| O3 | Unmatched | 300.00 |
A left join produces four rows. Adding the left amount on those rows gives 700.00, an increase of 100.00 caused solely by repeating O1. An inner join emits three rows and gives 400.00: it repeats O1 by 100.00 and drops unmatched O3 by 300.00. Neither total establishes corrected revenue. An inner total can fall even while some orders are multiplied.
Constructed orders CSV · Constructed items CSV · Scenario settings JSON · Independent answer key JSON · Fixture README text.
Use frequency products before examining a long joined file
For a nonblank key k, let Lk be its left frequency and Rk its right frequency. The inner join contributes Lk × Rk pairs. The left join contributes Lk × max(Rk, 1) rows. Each left null-key row adds one unmatched left-join row and no inner row. The pair rule and retention of unmatched left records follow the PostgreSQL join semantics; exact text comparison and the empty-key convention here are separately declared tool choices.
If X occurs twice on the left and three times on the right, it creates six pairs. The alternate constructed sample uses left amounts 10.00 and 20.00: source SUM = 30.00, joined SUM = 3 × 10.00 + 3 × 20.00 = 90.00. Its extra 60.00 is a fan-out witness. Download the two-row left CSV, three-row right CSV and many-to-many settings JSON.
Read the relationship declaration literally
| Declaration | Left obligation | Right obligation |
|---|---|---|
| 1:1 | At most one row per key | At most one row per key |
| 1:many | At most one row per key | Repeats permitted |
| many:1 | Repeats permitted | At most one row per key |
| many:many | Repeats permitted | Repeats permitted |
A contract exception is a reason to inspect the grain and source, not to click a looser declaration merely to remove the warning. Unmatched duplicate keys can violate a uniqueness promise too, even though they produce no inner pairs. The frequency table retains them. The tool reports both unmatched left and unmatched right source rows; unmatched right rows never appear in a left-join lineage.
Reconcile counts and money separately
For left row i with amount ai and mi matches, its repeated extra amount is ai × (mi − 1) when mi > 0. The complete bridge is selected joined SUM = original left SUM + repeated extra − unmatched amount dropped by an inner join. A left join drops zero. Amounts are parsed exactly into signed integer minor units with a two-digit scale; 100.00 becomes 10000. Totals cover every supported input row.
Zero amounts do not make repeated rows safe. A positive order and negative adjustment can cancel in the money bridge while both are multiplied. Check output counts, frequencies and row-pair lineage alongside the SUM. A zero-row left source has no defined row amplification ratio, displayed as N/A, though counts and sums remain zero.
Resolve exceptions without inventing a repair
The preview uses case-sensitive strings: 001, 1, O1 and o1 are distinct. It does not trim identifiers. An empty or whitespace-only component makes the whole composite key unmatched. CSV has no built-in null type; literal NULL and null are ordinary strings and can match identical strings. Record references are logical CSV record numbers including the header, so a quoted multiline field does not change their meaning.
Start by choosing the actual comma, semicolon or tab delimiter. Headers must be unique and nonblank, rows must have consistent width, and each key header goes on a separate line in corresponding order. Quotes and embedded delimiters are handled structurally using common RFC 4180 CSV conventions. The original CSV text remains in current-input JSON, while raw-source witness tables preserve parsed cell strings. This preserves values rather than original file bytes or encoding.
Every left amount is required, including unmatched rows. Blank, currency-marked, grouped, exponent or over-precision amounts stop the calculation rather than silently disappearing from totals. Declare one currency/unit and consistent scope; the tool cannot detect mixed currencies or verify a reporting window. Use the locale diagnostic if the amount syntax itself is unresolved.
Possible downstream resolutions include obtaining the missing detail file, selecting a genuinely unique lookup, aggregating item measures to order grain with a documented business rule, or adding a missing key component. Those changes require source evidence. Deleting repeated records, dividing an order amount equally among items or taking an arbitrary first row can change meaning; none is performed here.
Supported limits and the next decision
Each UTF-8 CSV is limited to 1 MB, 1,000 data rows and 50 columns. Counts are predicted before row pairs are materialised. Above 10,000 selected output rows, lineage generation is refused while complete source counts, frequencies and amount witnesses remain available. Totals that exceed safe integer precision are rejected. The tool supports exact left and inner equality joins only; no full/right joins, fuzzy matches, date ranges or automatic deduplication.
Download the page's current JSON result to retain the inputs, declarations and witnesses. It does not export a joined CSV or XLSX. Before importing a result into production, compare it with your actual downstream system's null, collation and conversion rules. Continue with the export-cleaning guide for a broader source-preservation workflow. A passed syntax and cardinality check still leaves business authority, completeness and allocation policy to be established.
