From 056f685a532b6dbd4e383f630ec507041e1ca2d9 Mon Sep 17 00:00:00 2001 From: Zac Deziel Date: Tue, 24 Sep 2024 19:16:41 -0400 Subject: [PATCH] Remove unused files and database configuration (#63) --- postgres/chunk_parquet.py | 0 postgres/deploy.md | 7 ------- postgres/download_parquet.sh | 7 ------- 3 files changed, 14 deletions(-) delete mode 100644 postgres/chunk_parquet.py delete mode 100644 postgres/deploy.md diff --git a/postgres/chunk_parquet.py b/postgres/chunk_parquet.py deleted file mode 100644 index e69de29..0000000 diff --git a/postgres/deploy.md b/postgres/deploy.md deleted file mode 100644 index ffa9b2b..0000000 --- a/postgres/deploy.md +++ /dev/null @@ -1,7 +0,0 @@ -## Deployment Notes - -- Create database instance -- Update configuration in `db.env` -- Ingest parquet file with `load_to_prod.sh` (may require `chmod +x load_to_prod.sh`) -- Create index on hex_id (for performance):`CREATE INDEX idx_hex_id ON space2stats (hex_id)` - critical for performance of our queries -- Test with the [example notebook](notebooks/space2stats_api_demo.ipynb) \ No newline at end of file diff --git a/postgres/download_parquet.sh b/postgres/download_parquet.sh index 6c2bc5f..3f46184 100644 --- a/postgres/download_parquet.sh +++ b/postgres/download_parquet.sh @@ -8,13 +8,6 @@ S3_BUCKET="wbg-geography01" PARQUET_FILE="Space2Stats/parquet/GLOBAL/combined_population.parquet" LOCAL_PARQUET_FILE="space2stats.parquet" -# PostgreSQL configuration -PGHOST="${MY_DOCKER_IP:-127.0.0.1}" -PGPORT=5439 -PGDATABASE="postgis" -PGUSER="username" -PGPASSWORD="password" - # Download Parquet file from S3 echo "Downloading Parquet file from S3..." aws s3 cp --quiet s3://$S3_BUCKET/$PARQUET_FILE $LOCAL_PARQUET_FILE