Replicate data from PostgreSQL to Snowflake
Learn to replicate data from PostgreSQL to Snowflake using OCI GoldenGate.
Before you begin
To successfully complete this quicktart, you must have the following:
- A PostgreSQL installation to serve as the source database (Installation instructions follow in Environment set up).
- Open port 5432 in your VCN's security list.
- A Snowflake database to serve as the target database.
Environment set up: Snowflake
- Create a GoldenGate user in Snowflake with appropriate privileges.
- Create target tables using sample schema.
Ensure the tables and user have been succesfully created.
Task 1: Create the OCI GoldenGate resources
This quickstart example requires deployments and connections for both
the source and target.
- Create a deployment for the source PostgreSQL database.
- Create a Big Data deployment for the target Snowflake database.
- Create a PostgreSQL
connection with the following values:
- For Type, select PostgreSQL Server from the dropdown.
- For Database name, enter
ociggll
. - For Host, enter the public IP of the Compute instance that PostgreSQL runs on.
- For Port, enter
5432
. - For Username, enter
ggadmin
. - For Password, enter your password.
- For Security Protocol, select Plain from the dropdown.
- Create a Snowflake connection with the following values:
- (Optional) If your Big Data deployment doesn't have a public endpoint, then create a connection to GoldenGate, and then assign this connection to the source PostgreSQL deployment.
- Assign the source PostgreSQL connection to the PostgreSQL deployment.
- Assign the Snowflake connection to the target Big Data deployment.
Task 3: Create the Extracts
- Add the Change Data Capture Extract:
- Add the Initial Load Extract:
You return to the Extracts
page, where you can observe the Extract
starting.
Task 4: Create the Distribution Path for Initial Load Extract
To create a Distribution Path for Initial Load Extract:
Task 6: Create the Distribution Path for Change Data Capture
To create a Distribution Path for Change Data Capture:
- In the source PostgreSQL deployment console, click Distribution Service.
- Click Add Distribution Path.
- Complete the Add Path form as follows:
- In the target Big Data deployment console, click Receiver Service, and then review the Receiver path created.