This repository contains the implementation I did while reading the book. All SQL queries as well as a description how to setup everything on Windows 10 using Docker are also part of this repository.
A Curious Moon by Rob Conery.
- Website: https://bigmachine.io/products/a-curious-moon/
- Github: https://github.com/red-4/curious-moon
- build the Docker images
docker compose build
- or
docker-compose build db
to build the database image alone
- or
docker-compose up -d
to download the Docker images and start the containers- download the RAW cassini data from Redfour
- store the files under
./curious/data
docker exec -it curious_db bash
to open a Bash on the Postgres containercd /home/curious
to browse the mounted directory with the make file and raw CSV datamake import_master_plan
to import the master plan data into the enceladus databaselocalhost:5050
to open a pgAdmin window on the Docker host machine (your local machine)- login with
[email protected]
and123456
to login to the pgAdmin - create a server connection to the Postgres server using
curious_db:5432
and[email protected]
withmysecretpassword
to browse the enceladus database
Download the raw data from http://archive.redfour.io/cassini/cassini_data.zip. To begin with I am only interested in the master_plan.csv
file. The other files cda.csv
, inms.csv
, jpl_flybys.csv
, and chem_data.csv
will also be necessary later.
The docker-compose.yaml file contains a pgAdmin container additionally.
Open the browser on your host machine (your local machine) and visit http://localhost:5050. Use the email [email protected]
with the password 123456
to login to pgAdmin
Make a new server connection curious_db
with port 5432
and username postgres
and password mysecretpassword
.
Name the connection Curious-Moon-Enceladus
.
Open a Bash on the Docker container.
psql -U postgres
to open the Postgres shell (PSQL) for the user postgres
to type SQL commands directly.
E.g. create database enceladus;
to create a database if it is not there yet (e.g. if it was dropped before)
Type \q
to exit Postgres shell (PSQL).
I really liked Dee's drawings to make things clearer - that's why I drew them myself.