Join PostgreSQL and MySQL tables without moving data
Customers are in PostgreSQL, orders are in MySQL, and you need one report with both. This page explains why plain SQL cannot do it, the options you have, and how to do it in Ruamhub.
Why a normal JOIN does not work
A JOIN runs inside one database. PostgreSQL cannot see MySQL tables, and the other way round. Something has to read both sides and combine them: a person (export and merge in Excel), a database extension, or a tool in the middle.
Your options
| Option | What you need | Repeat every week | Good for |
|---|---|---|---|
| Export CSV, merge in Excel | Nothing | By hand, every time | One-off work, small data |
| postgres_fdw / mysql_fdw | Superuser rights, extensions installed on the server | Yes, with a view or cron | Teams with a DBA who runs the database |
| Warehouse + ETL | A server, an ETL tool and someone to run it | Yes | Hundreds of millions of rows |
| Join Canvas in Ruamhub | Two connections (read-only is fine) | Yes, scheduled on Dev and above | Teams who want the result today, without touching servers |
Doing it in Ruamhub
Connect both databases
Add the PostgreSQL and MySQL connections. Tick read-only: a join only reads.
Drag both tables in
Drag customers from PostgreSQL and orders from MySQL onto the Join Canvas, then draw a line from customers.id to orders.customer_id.
Pick the join and check
Choose an inner or left join and check the first 100 rows. Add a filter or group by if you need totals.
Save it as a table
Set a target table in a writable database, then run it now or schedule it every night.
| id | name |
|---|---|
| 1 | Somchai K. |
| 2 | Narin P. |
| 3 | Malee S. |
| id | customer_id | total |
|---|---|---|
| 1042 | 1 | 1,250 |
| 1043 | 2 | 480 |
| 1044 | 1 | 2,900 |
| 1045 | 3 | 760 |
| order | customer | total |
|---|---|---|
| #1042 | Somchai K. | ฿1,250 |
| #1043 | Narin P. | ฿480 |
| #1044 | Somchai K. | ฿2,900 |
| #1045 | Malee S. | ฿760 |
Which plan you need
- The Free plan is enough to try it all: 2 connections, 1 pipeline and 30 manual runs a month
- Running on a schedule needs Dev or above
- Your databases must be reachable from the internet, or through an SSH tunnel
Works well with
Join Canvas
Drag tables from different databases or Excel files onto a canvas, join, filter and group them, and see the result right away.
DetailsDatabase connections
Connect PostgreSQL, MySQL, SQL Server, Oracle, SQLite and MongoDB over TLS or an SSH tunnel, mark them read-only, and let the team use them without knowing the password.
DetailsPipelines and schedules
Save a Join Canvas result as a table in the database you choose, or send it as a report by email, SFTP, S3 or a shared folder. Run it by hand or on a schedule, and see every run.
Details
Frequently asked questions
Can I use it with production databases?
Yes. Mark the connection read-only and every write to that database is blocked; write the result to a separate reporting database.
How does a PostgreSQL to MySQL join work?
DuckDB reads the tables from each connection and joins them. Nothing is stored at Ruamhub except the result table you choose to write into your own database.
What if some data is in an Excel file too?
Upload the CSV or .xlsx file and place it on the same canvas; it joins with tables from both databases.
Bring all your databases into one place
Start free, or book a demo and we will walk through it with your own team’s data.