Stitch Documentation
has moved!

Please update your bookmarks to https://www.stitchdata.com/docs

If you're not automatically redirected after 5 seconds, click here.

Connecting a Heroku-Postgres Destination

Important!
Please note that our Postgres destination is currently in open beta. The information in this article is subject to change.

In this tutorial, we'll walk you through connecting your Heroku Postgres destination to Stitch. Because Heroku is a cloud-based managed database service, spinning up an instance to connect to Stitch only takes a few minutes. No tech expertise required.

Note that the Heroku database you connect to Stitch must be an existing database. Stitch won’t create one for you. We’ll walk you through how to do this in this tutorial.

Connecting a Heroku Postgres destination is a three-step process:

  1. Create a Heroku database
  2. Locate the database settings in Heroku
  3. Enter the connection info into Stitch

Creating a Heroku Database

In this first step, you’ll create a database in Heroku and wait for it to provision.

Don’t have a Heroku account?
Signing up for Heroku only takes a minute. Heroku has a variety of plans to choose from, including a Free option. Check out Heroku’s Choosing the Right Heroku Postgres Plan article if you need some help selecting a plan.

You can create an account here if you don’t have one already. Please contact Heroku if you have questions about their pricing, product features, or support.

  1. Sign into your Heroku account.
  2. Navigate to the Databases page by clicking the Options menu (the grid icon next to your avatar in the upper right corner) then Databases.
  3. Click the Create Database button in this screen.
  4. In the Plan prompt, select the plan you want to use.
  5. Select the Region for the database by clicking the Default Region drop-down menu.
  6. Click Add Database.

Heroku will begin the database provisioning process, which can take a few minutes. The status of your database will change to Available in the Database Dashboard page when things are complete:

Locating the Database Settings in Heroku

Next, you’ll locate the database settings in Heroku. This info will be used in the last section to connect Stitch to your Heroku Postgres destination.

  1. On the Heroku Database Dashboard page, click the database you just created.
  2. The database settings and credentials will display. Everything you need is in the Connection Settings section of this page:

Leave this page open for now - you’ll need it to wrap things up.

Entering the Connection Info into Stitch

  1. In another tab or window, sign into your Stitch account.
  2. From the Stitch Dashboard page, click User menu > Destination Settings.
  3. Click the PostgreSQL icon.
  4. In the PostgreSQL Destination Settings page, fill in the following fields:
    • Host:  Enter the host address (endpoint) used by your Heroku database.
    • Port: Enter the port used by your Heroku database.
    • Database: Enter the name of the Heroku database.
    • Username: Enter the Heroku database user's username. Note that this is not your Heroku username - it's the user listed in the Database Settings page from the previous section.
    • Password: Enter the Heroku database user's password. Note that this is not your Heroku password - it's the password listed in the Database Settings page from the previous section.
  5. Check the Connect using SSL box. Heroku requires SSL to connect - if you leave this unchecked, Stitch will be unable to connect to your Heroku-Postgres database.
  6. Click  Update PostgreSQL Settings.

Stitch will perform a connection test to the Heroku Postgres database; if successful, a Success! message will display at the top of the screen. Note that this test may take a few minutes to complete.

Troubleshooting Connection Errors

If you receive an error message, we recommend:

  • Verifying that the Connect using SSL box in the Stitch Destination Settings page is checked. Heroku requires SSL to be enabled for the connection to be successful.
  • Checking Heroku’s Status Page for possible service outages.

If the errors persist, please reach out to support.

Learning About Stitch & Postgres

Now that your Heroku Postgres destination is up and running, we recommend learning about how Stitch will load and store your data in your data warehouse.

The Postgres Destination Overview doc is a good jumping-off point for learning about how Stitch handles nested data structures, certain data types, and more.

Was this article helpful?
0 out of 0 found this helpful

Comments

Questions or suggestions? If something in our documentation is unclear, let us know in the comments!