From c85b321a60fe0094b7aecdc926f19cd702116c0e Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Mon, 28 Mar 2022 15:06:23 +0100 Subject: [PATCH] revert changes to env vars --- etl/load_geometries.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etl/load_geometries.sh b/etl/load_geometries.sh index 27d6b07f..4a4d5745 100755 --- a/etl/load_geometries.sh +++ b/etl/load_geometries.sh @@ -17,12 +17,12 @@ mastermap_dir=$1 find $mastermap_dir -type f -name '*.3857.csv' \ -printf "$mastermap_dir/%f\n" | \ parallel \ -cat {} '|' PGHOST=$PGHOST PGDATABASE=$PGDATABASE PGUSER=$PGUSER PGPASSWORD=$PGPASSWORD psql -c "\"COPY geometries ( geometry_geom, source_id ) FROM stdin WITH CSV HEADER;\"" +cat {} '|' psql -c "\"COPY geometries ( geometry_geom, source_id ) FROM stdin WITH CSV HEADER;\"" # # Delete any duplicated geometries (by TOID) # -PGHOST=$PGHOST PGDATABASE=$PGDATABASE PGUSER=$PGUSER PGPASSWORD=$PGPASSWORD psql -c "DELETE FROM geometries a USING ( +psql -c "DELETE FROM geometries a USING ( SELECT MIN(ctid) as ctid, source_id FROM geometries GROUP BY source_id