Replicate data from PostgresSQL to Snowflake using Streaming Handler
Discover how to use OCI GoldenGate to replicate data from PostgreSQL to Snowflake using Streaming Handler.
Before you begin
To successfully complete this quickstart, you must have the following:
- Access to OCI Database with PostgreSQL
- Open port 5432 in the security list of the VCN used by OCI Database with PostgreSQL
- Access to Snowflake
Set up OCI Database with PostgreSQL
- Create an OCI Database with PostgreSQL.
- Connect to OCI PostgreSQL. See Connecting to a Database for more information.
- Create a database and user for GoldenGate in OCI PostgreSQL:
Set up Snowflake database
- Create Snowflake database.
- Users must create a public and private key pair to authenticate into Snowflake.
- Create a user specifically for GoldenGate in Snowflake with appropriate privileges.
- Add the public key to Snowflake user, for example:
ALTER USER example_user SET RSA_PUBLIC_KEY='MIIBIjANBgkqh...';
- Create target tables using sample schema.
Task 1: Create the OCI GoldenGate resources
This quickstart example requires deployments and connections for both
the source and target.
- GoldenGate for PostgreSQL 23ai is required.
- Create a PostgreSQL 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 OCI PostgreSQL from the dropdown.
- For Database name, enter
ociggll
. - For Username, enter
ggadmin
. - For Password, enter your password.
- For Security Protocol, select TLS from the dropdown, and then select Prefer.
- Create a Snowflake connection with the following values:
- Create a connection to GoldenGate for the target Big Data deployment, 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.