Skip to content
Workflow · Clean and combine · Opening soon

Compare two MySQL tables and list the differences

Export each table from MySQL, then load both files into the workflow. Match rows by product id, compare price and status, and keep only rows that are missing on either side or do not match.

Early access opens shortly. Check back soon.

Someone typed

“compare production products to reporting by product id and show only missing rows or price and status mismatches, with status missing in reporting, missing in production, or values differ”

The agent read it as

Compare MySQL products table — production to MySQL products table — reporting copy by product id and show only missing rows or price and status mismatches

What the agent built

4 steps, each one an ordinary Mammoth step you can open and change.

  1. File
    MySQL products table — production
    CSV export · 40 rows
  2. File
    MySQL products table — reporting copy
    CSV export · 40 rows
  3. Step
    Make production product key
    Step 1
  4. Step
    Make reporting product key
    Step 2
  5. Join
    Bring in reporting products
    38 of 40 paired
  6. Step
    Keep product mismatches
    Step 4
  7. Result
    Product mismatch flags
    9 rows · 9 flagged
  8. Schedule
    Runs when you say
    Proposed

On the sample files, every step runs and the result has 9 rows.

What you get back

The result of that run, the rows to look at first.

Product mismatch flagsSample data9 rows
5 values differ2 missing in production2 missing in reporting
Product IDStatusProduction priceReporting priceProduction statusReporting status
p_1015Missing in reporting22.90·active·
p_1031Missing in reporting8.95·active·
p_2001Missing in production·42·active
p_2002Missing in production·34.75·active
p_1004Values differ29.9930.49activeactive
p_1007Values differ12.7512.75discontinuedactive
p_1020Values differ44.9043.95activeactive
p_1029Values differ2525activediscontinued
p_1038Values differ27.5028activeactive
9 rows in the result. Sample data: illustrative figures, not business results.

How it works

How to use the Product mismatch flags workflow

  1. 1Get early accessWe invite people in small batches, job by job. You'll land on this workflow, already built and working on sample files.
  2. 2Swap in your exportsUpload your own files as they come out of your tools. The agent checks the workflow on your rows.
  3. 3Change it in words, then turn it onSay what to change and see the new result before anything saves. Then choose when it runs.

Product mismatch flags: questions

How do you compare two MySQL tables and list the differences?
Export each table from MySQL, then load both files into the workflow. Match rows by product id, compare price and status, and keep only rows that are missing on either side or do not match.
What export should you use from MySQL?
Use a table export that includes the columns you need to compare, at least product id, price, and status. Export both tables in a spreadsheet-friendly format such as CSV.
What happens to rows that do not match?
The workflow keeps rows where a product id is missing in one file or where the compared fields differ. Rows that match on product id, price, and status are left out.
How do you change the comparison rules?
Change which columns you match on and which fields you compare in the workflow steps. For example, you can switch the key from product id to another unique column, or compare a different set of fields.

Get early access to this workflow

It opens already built and working on sample files. Swap in your own exports to see your result.

Early access opens shortly. Check back soon.