For the impatient#
If you want to skip all the cleaning and transformations and dive directly into triage you can execute the following inside bastion:
psql ${DATABASE_URL} -c "\copy raw.inspections from program 'curl "https://data.cityofchicago.org/api/views/4ijn-s7e5/rows.csv?accessType=DOWNLOAD"' HEADER CSV"
psql ${DATABASE_URL} < /sql/create_cleaned_inspections_table.sql
psql ${DATABASE_URL} < /sql/create_violations_table.sql
psql ${DATABASE_URL} < /sql/create_semantic_tables.sql
If everything works, you should end with two new schemas: cleaned and semantic.
You could check that (from psql) With
\dn
| List of schemas | |
|---|---|
| Name | Owner |
| cleaned | food_user |
| postgis | food_user |
| public | postgres |
| raw | food_user |
| semantic | food_user |