public.orders from an application PostgreSQL database into analytics.orders_live in a reporting PostgreSQL database.
Before you begin
Have these ready:- PostgreSQL source host, port, database, username, password, and SSL mode
- PostgreSQL destination host, port, database, username, password, and SSL mode
- A source user with read access to
public.orders - A destination user with write access to
analytics.orders_live - A pre-created destination table named
analytics.orders_live
Build the pipeline
- Open Connections and create a Source connection with PostgreSQL.
- Fill the connection form and click Test Connection.
- Save the source after the test succeeds.
- Create a second PostgreSQL connection with the role set to Destination.
- Click Test Connection and save the destination after the test succeeds.
- Open Data Pipelines and create a new pipeline with a name and the source connection.
- In the builder, click the settings icon on the Source node.
- Click Discover schema or Refresh tables.
- Include
public.ordersand preview the rows. - Click the settings icon on the Destination node.
- Choose the destination connection.
- Keep Sync mode as
FULL_TABLEfor the first validation run. - Keep Write mode as
Upsert. - In the SQL Layer tab, set the final delivery table to
analytics.orders_live. - Use a simple SQL model:
- Click Validate SQL.
- Click Preview output.
- Click Save destination.
- Run the destination manually from the destination node.
- Open run status or run history and confirm the run succeeded.
Add a schedule later
Scheduling is available after switching the destination toINCREMENTAL and providing a replication key such as updated_at.
Validate at least one manual run before enabling a recurring schedule.