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.
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.
File
MySQL products table — production
CSV export · 40 rows
File
MySQL products table — reporting copy
CSV export · 40 rows
Step
Make production product key
Step 1
Step
Make reporting product key
Step 2
Join
Bring in reporting products
38 of 40 paired
Step
Keep product mismatches
Step 4
Result
Product mismatch flags
9 rows · 9 flagged
Schedule
Runs when you say
Proposed
- FileMySQL products table — productionCSV export · 40 rows
- FileMySQL products table — reporting copyCSV export · 40 rows
- StepMake production product keyStep 1
- StepMake reporting product keyStep 2
- JoinBring in reporting products38 of 40 paired
- StepKeep product mismatchesStep 4
- ResultProduct mismatch flags9 rows · 9 flagged
- ScheduleRuns when you sayProposed
On the sample files, every step runs and the result has 9 rows.
- Download MySQL products table — production sample (40 rows)MySQL: production database > products > Export result set
- Download MySQL products table — reporting copy sample (40 rows)MySQL: reporting database > products > Export result set
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 ID | Status | Production price | Reporting price | Production status | Reporting status |
|---|---|---|---|---|---|
| p_1015 | Missing in reporting | 22.90 | · | active | · |
| p_1031 | Missing in reporting | 8.95 | · | active | · |
| p_2001 | Missing in production | · | 42 | · | active |
| p_2002 | Missing in production | · | 34.75 | · | active |
| p_1004 | Values differ | 29.99 | 30.49 | active | active |
| p_1007 | Values differ | 12.75 | 12.75 | discontinued | active |
| p_1020 | Values differ | 44.90 | 43.95 | active | active |
| p_1029 | Values differ | 25 | 25 | active | discontinued |
| p_1038 | Values differ | 27.50 | 28 | active | active |
How it works
How to use the Product mismatch flags workflow
- 1Get early accessWe invite people in small batches, job by job. You'll land on this workflow, already built and working on sample files.
- 2Swap in your exportsUpload your own files as they come out of your tools. The agent checks the workflow on your rows.
- 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.
Workflows like this
Remove duplicates, tidy names and addresses, fill the blanks, and merge files into one.
- Pivot table from raw dataTurn a raw sales export into a pivot table of revenue by region and month.See the workflow Built by the agent
- Merge Excel or CSV filesOne tidy table with every file's rows, re-sent rows dropped, and a Period columnSee the workflow Template
- Remove duplicatesOne row of each, with a Copies column saying how many there wereSee the workflow Template
- Remove blank rowsRemove rows that are empty or only contain spaces from an Excel export, while keeping the rest of the sheet unchanged.See the workflow Built by the agent
- Match names to a master listEach record with its master name (and ID), and how it matchedSee the workflow Template
- Multi-entity consolidationEvery entity's balances in one currency, by accountSee the workflow Template