Skip to main content
Version: v2.x

Using Hasura Cloud with an EnterpriseDB (BigAnimal) Postgres database

Available on: Cloud

Introduction​

This guide explains how to connect a new or existing EnterpriseDB (BigAnimal) Postgres database to a Hasura Cloud project.

Step 1: Sign up or log in to Hasura Cloud​

Navigate to Hasura Cloud and sign up or log in.

Step 2: Create a Hasura Cloud project​

On the Hasura Cloud dashboard, create a new project:

Create Hasura Cloud project

After the project is initialized successfully, click on Launch Console to open the Hasura Console in your browser.

On the Hasura Console, navigate to Data -> Manage -> Connect Database -> Connect existing database:

You will get prompted for a Postgres Database URL. We will create this in the next step and then come back here.

Hasura Cloud database setup

Step 3: Create a BigAnimal Postgres DB on EnterpriseDB (skip if you have an existing DB)​

Log into EnterpriseDB and head to your dashboard.

From your dashboard, scroll down and click Test drive for free in the BigAnimal section:

Test drive BigAnimal

EnterpriseDB will create a free trial and redirect you to your BigAnimal portal. From this portal, click Create New Cluster:

Create new cluster

Select the type of cluster and provider you plan to use, then click Next: Cluster Settings:

Choose type and provider

Enter a cluster name and password:

Add name and password

Choose a database type, region, and instance type:

Choose cluster type and region

Select your storage and networking requirements, then click Create Cluster:

Choose storage and networking

You'll be redirected to your BigAnimal portal and should see your cluster provisioning like this:

Cluster provisioning

Congratulations! You've now created a BigAnimal Postgres instance on EnterpriseDB which you can use with Hasura GraphQL Engine. Follow the steps below to connect it to Hasura.

Step 4: Get the database connection parameters and finish connecting the database​

The structure of the database connection URL looks as follows:

postgresql://<user-name>:<password>@<host-server>:<port>/<database-name>

BigAnimal doesn't provide an out-of-the-box connection string matching the format above. Instead, we'll use the parameters from the Connect tab and pass them to Hasura.

After BigAnimal has provisioned the cluster, click on the title:

Cluster ready

From the cluster's dashboard, choose the Connect tab:

Cluster connection parameters

For each of the following under Connection Info, click Copy and paste their values into the appropriate fields on the Hasura Console:

BigAnimal parameterHasura parameter
DbnameDatabase Name
Read/Write HostHost
PortPort
UserUsername

Back on the Hasura Console, paste your values into the mapped field:

Connect to Hasura Console
Note

BigAnimal doesn't present your password on the Connect tab. You'll need to provide the password you used to create the cluster in Hasura's Password field.

Then click Connect Database.

Note

For security reasons, it is recommended to set database URLs as env vars and using the env vars to connect to the databases in place of the raw database URLs.

Voilà. You are ready to start developing.

Hasura Console

Next steps​

You can check out our 30-Minute Hasura Basics Course and other GraphQL & Hasura Courses for a more detailed introduction to Hasura.

You can also click the gear icon to manage your Hasura Cloud project. (e.g. add collaborators, env vars or custom domains).

Project actions