1

we have a big file SQL dump that we need to import to Hasura, currently running on Heroku. What is the mechanism to import the dump file into Hasura?

1 Answer 1

2

Importing a SQL file to Hasura is the same as importing the SQL file to the Heroku Postgres instance.

Install psql (the command line tool for Postgres) and then restore the SQL file using that.

Head to your Heroku dashboard and then head to Setting tab and Reveal Config Vars. There you'll find DATABASE_URL.

Copy the DATABASE_URL and execute the following command:

psql DATABASE_URL -1 -f file.sql 

This will execute all statements in the file against the database.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.