Using Hasura Cloud with an EnterpriseDB (BigAnimal) Postgres database
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:
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.
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:
EnterpriseDB will create a free trial and redirect you to your BigAnimal portal. From this portal, click
Create New Cluster:
Select the type of cluster and provider you plan to use, then click
Next: Cluster Settings:
Enter a cluster name and password:
Choose a database type, region, and instance type:
Select your storage and networking requirements, then click
You'll be redirected to your BigAnimal portal and should see your cluster provisioning like this:
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:
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:
From the cluster's dashboard, choose the
For each of the following under
Connection Info, click
Copy and paste their values into the appropriate fields on
the Hasura Console:
|BigAnimal parameter||Hasura parameter|
Back on the Hasura Console, paste your values into the mapped field:
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
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.