← All posts
by Arif Aslam 4 min read

How to Join Multiple CSV Files Without Coding

You have customer data in one CSV and order data in another. You need to combine them. In a database, this is a JOIN. In Excel, it's VLOOKUP. In ExploreMyData, you can do it visually in your browser.

How joining works

A join combines rows from two tables based on a shared column (the "key"). For example, if both files have a customer_id column, you can join on it to bring order data alongside customer data.

Step by step

  1. Open both files. Drag your first CSV onto ExploreMyData. Then click the + tab to add the second file.
  2. Navigate to the file you want as the left (primary) table. Click its tab.
  3. Click the green + in the Pipeline panel and select Join from the Data group.
  4. Configure the join:
    • Right table: select the second file from the dropdown
    • Left key: the matching column in your current file (e.g., "customer_id")
    • Right key: the matching column in the second file (e.g., "customer_id")
    • Join type: a four-button switch reading Inner, Left, Right, Full (see below). Inner is selected by default.
    • Right columns: optionally pick which columns to bring from the right table
  5. Click Apply. The joined result appears in your grid.

Join types explained

Inner : Only rows where the key exists in BOTH tables.
        Customers without orders are excluded.
        Orders without matching customers are excluded.

Left  : All rows from the left table, plus matching rows
        from the right. Customers without orders appear
        with NULL for order columns.

Right : All rows from the right table, plus matching rows
        from the left. Orders without matching customers
        appear with NULL for customer columns.

Full  : All rows from both tables. Unmatched rows on either
        side appear with NULLs for the other table's columns.

Common use cases

  • Enrich data: join a transactions file with a products file to add product names and categories to each transaction.
  • Find missing data: use a LEFT JOIN and filter for NULLs on the right side to find customers who haven't placed orders.
  • Combine exports: join a CRM export with a billing export on email or customer ID.

Under the hood

The generated SQL looks like:

SELECT "__mammoth_l"."order_id",
       "__mammoth_l"."product_id",
       "__mammoth_l"."qty",
       "__mammoth_r"."product_name",
       "__mammoth_r"."category"
FROM "orders" AS "__mammoth_l"
LEFT JOIN "products" AS "__mammoth_r"
  ON "__mammoth_l"."product_id" = "__mammoth_r"."product_id"

Both tables get an alias so that a column called name on the left and a column called name on the right don't collide. The aliases are deliberately ugly (__mammoth_l and __mammoth_r) so they can't clash with a real table name in your workspace. When you pick specific right columns, the left columns are listed out one by one as above. When you don't, the whole thing collapses to "__mammoth_l".*, "__mammoth_r".*.

Watch out: duplicate keys multiply rows

This is the one join surprise that bites everyone at least once. A join is not a lookup. If the key appears more than once on the right, the left row is repeated for each match, and your row count goes up instead of staying the same.

Two orders on the left:

order_idproduct_id
1001P-1
1002P-2

A products file where P-1 was entered twice:

product_idproduct_name
P-1Widget
P-1Widget (EU)
P-2Gadget

Two rows in, three rows out:

order_idproduct_idproduct_name
1001P-1Widget
1001P-1Widget (EU)
1002P-2Gadget

Order 1001 is now counted twice, and any SUM over that result is wrong. Check the row count before and after every join. If it grew, your right table has duplicate keys. The fix is a Remove Duplicates step on the right file before joining, keyed on the join column, or a Group & Aggregate to collapse the right side to one row per key.

Tips

  • Make sure the key columns have the same data type. If one is a number and the other is text, use Convert Type first.
  • You can join files of different formats, for example a CSV with a Parquet file.
  • After joining, you can apply any other operation (filter, aggregate, pivot) on the combined result.

Start joining your files →

AA

Arif Aslam

Staff engineer in Bangalore. By day at Mammoth Analytics; building ExploreMyData on the side. More on my author page or LinkedIn.

Try it yourself

No sign-up, no upload, no tracking.

Open ExploreMyData