Worried about the security of your data? Don’t be. Heroku encrypts data using SSL by default, so you can rest easy knowing your private data will stay private.
To connect your Heroku Postgres database to Stitch, you’ll need to do a few things:
- Retrieve your Postgres credentials from Heroku
- Enter the connection info into Stitch
- Define the Replication Frequency
- Select tables and columns to sync
Retrieving Your Postgres Credentials from Heroku
If you haven’t logged into your Heroku app yet, do so now. After you’re logged in, do the following to retrieve your Heroku Postgres database credentials:
- In the main dashboard section of the Heroku app, locate the Add-ons section. Add-ons will list any Postgres databases currently added to your Heroku account.
- Click the name of the database you want to connect to Stitch.
- The credentials needed to connect to Stitch will display in the Connection Settings section.
To finish the setup, you’ll need the Host, Database, User, Port, and Password (click Show to display it).
Here’s a look at the credentials page:
Leave this open for now - you'll need it in the next step to complete the setup.
Entering the Connection Info into Stitch
To wrap things up, we need to enter the connection and user info into Stitch.
- From the Stitch dashboard page, click the Add an Integration button.
- Click the Heroku icon.
- In the Heroku credentials page, fill in the following fields:
- Integration name: This is the name that will display on the Stitch dashboard for the integration; it’ll also be used to create the schema in your data warehouse.
For example, the name “Heroku ecommerce” would create a schema called
heroku_ecommerce in the data warehouse.
- Host: The host address used by your Heroku instance
- Port: The port used by your Heroku instance
- Database: The name of the Heroku database
- Username: The Heroku database user's username
- Password: The Heroku database user's password
Remember: Because Heroku Postgres enforces SSL by default, you don’t need to take any further action to encrypt your data.
Defining the Replication Frequency
The Replication Frequency controls how often Stitch will attempt to replicate data from your data warehouse. By default, the frequency is set to 30 minutes, but you can change it to better suit your needs.
When you're finished, click the Save Integration button to complete the setup.
Selecting Tables and Columns to Sync
Now that your Heroku PostgreSQL database is connected to Stitch, the next step is selecting the tables and fields you want to sync.