Follow our setup guide to connect Google Cloud PostgreSQL as a destination to Fivetran.
To connect your Google Cloud PostgreSQL database as a destination in Fivetran, you need:
- PostgreSQL version 7.3 or above
- Database host’s IP (e.g.,
126.96.36.199) or domain (
- Port (usually
Choose connection method link
Decide whether to connect to your Google Cloud PostgreSQL database directly or using an SSH tunnel. For more information, see our destination connection options documentation.
If you connect directly, you must create a rule in a security group that allows Fivetran access to your database port and instance.
Configure your firewall and/or other access control systems to allow:
Connect using an SSH tunnel
If you connect using an SSH tunnel, Fivetran connects to a separate server in your network that provides an SSH tunnel to your Google Cloud PostgreSQL database. You must then configure your tunnel server’s security group to allow Fivetran access and configure the instance’s security to allow access from the tunnel.
You must connect through SSH if your database is contained within an inaccessible subnet.
In the destination setup form, select the Connect via an SSH tunnel option.
Copy Fivetran’s public SSH key.
Add the public key to the
authorized_keysfile of your SSH server. The key must be all on one line, so make sure that you don’t introduce any line breaks when cutting and pasting.
Allow Fivetran accesslink
Log in to your Google Cloud Platform dashboard.
In the left navigation menu, select SQL.
In the Instances window, find the database you want to connect to Fivetran.
Click the menu button (represented as three vertical dots) for that database and select Edit.
On the Edit instance page, select Connectivity.
Click + Add network.
In the Name field, enter a memorable name. For example,
In the Network field, enter Fivetran’s IPs.
Click Done and then click Close.
Create Fivetran userlink
Connect to your Google Cloud PostgreSQL database and execute the following query to create a user for Fivetran. Choose a memorable username (for example,
<password>with a password of your choice:
CREATE USER fivetran PASSWORD <password>;
Execute the following query to grant the
fivetranuser the following privileges:
- CREATE: Allows the user to create new schemas in the database
- TEMPORARY: Allows the user to create temporary tables while using the database
GRANT CREATE, TEMPORARY ON DATABASE <database> TO fivetran;
Complete Fivetran configuration link
- Log in to your Fivetran account.
- Go to the Manage Account page.
- In the Destinations tab, click +Destination.
- On the Add Destination To Fivetran page, enter a destination name of your choice.
- Click Continue.
- Select Google Cloud PostgreSQL as the destination type.
- In the destination setup form, enter the Host name or the IP address of the database server.
- Enter the Port number. For example,
- Enter the User name you created in Step 3.
- Enter your Password.
- Enter the Database name you want to replicate to.
- Choose your Connection method. You can choose to Connect directly or Connect via an SSH. If you choose Connect via an SSH tunnel, enter the following details:
- SSH Host
- SSH Port
- SSH User
- (Optional) Enable the Require TLS through tunnel toggle if you want to use TLS.
- Choose the Data processing location.
- Choose your Timezone.
- Click Save & Test.
Fivetran tests and validates the Google Cloud PostgreSQL destination connection. On successful completion of the setup tests, you can sync your data using Fivetran connectors to the Google Cloud PostgreSQL destination.