Importing from SQL filesΒΆ

  • Create a directory called sql in the Postgres microservice container.
hasura microservice exec --namespace=hasura postgres -- mkdir /sql
  • Copy your SQL file to this new directory in the container.
hasura microservice cp <path-to-file>/data.sql hasura/postgres:/sql/data.sql
  • Run this SQL file using psql
hasura ms exec --namespace=hasura postgres -- psql -U admin -d hasuradb -a -f "/sql/data.sql"