← Use cases

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

OptionWhat you needRepeat every weekGood for
Export CSV, merge in ExcelNothingBy hand, every timeOne-off work, small data
postgres_fdw / mysql_fdwSuperuser rights, extensions installed on the serverYes, with a view or cronTeams with a DBA who runs the database
Warehouse + ETLA server, an ETL tool and someone to run itYesHundreds of millions of rows
Join Canvas in RuamhubTwo connections (read-only is fine)Yes, scheduled on Dev and aboveTeams who want the result today, without touching servers

Doing it in Ruamhub

  1. Connect both databases

    Add the PostgreSQL and MySQL connections. Tick read-only: a join only reads.

  2. 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.

  3. 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.

  4. Save it as a table

    Set a target table in a writable database, then run it now or schedule it every night.

postgres customers
idname
1Somchai K.
2Narin P.
3Malee S.
mysql orders
idcustomer_idtotal
104211,250
10432480
104412,900
10453760
Joined result
ordercustomertotal
#1042Somchai K.฿1,250
#1043Narin P.฿480
#1044Somchai K.฿2,900
#1045Malee 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.

    Details
  • Database 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.

    Details
  • Pipelines 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.