简体   繁体   中英

How to import a SQL dump file into Hasura

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM