Skip to content

Database → transform → database (upsert)

Reads customers out of the demo database, reshapes them with a mapping, and upserts them into demo.orders keyed on order_ref. Running it twice is the point: the row count does not move, because an upsert matched every row it had already written.

The pipeline

This is the actual graph the template creates — 3 steps.

Connects to

  • PostgreSQL

How you know it worked

demo.orders started empty. After one run it holds five rows, one per customer. Run it a second time and it still holds five — that is the upsert matching on order_ref rather than inserting duplicates. (updated_at does not move: the write sets only the three columns the mapping names, which is what a column-mapped write means.)

Try this template

Used in: Education & government

Stop moving data by hand.

Start free with three projects, or talk to us about running it across your organisation.