If you prefer to run queries on your local machine, you can instead refer to the steps and scripts in this repository for the katacoda scenario which will help you set up a Postgres server Docker container.
- Install Docker on your local machine.
- Run
foreground.shto create a Docker container. - Follow the instructions given in
step1.md:pgcli.shandpsql.shrefer to the scripts with the same name in theassetsdirectory. - Download
assets/datasets.zip. - Run
populate.sh, replacing the path/tmp/datasets.zipon line 3 with the path todatasets.zipon your local machine. - Follow the rest of the instructions in
step2.mdandstep3.md.
If you have already installed Postgres on your local machine, simply download assets/datasets.zip and for each directory:
- Create a Postgres database with the same name as the directory.
- Open a Postgres client and run the commands in
schema.sql. - Import the table data for each
.tblfile in thedatasubdirectory using the SQL statementCOPY {table_name} FROM '{PATH_TO_TBL_FILE}' WITH delimiter AS '|';.