diff --git a/etl/update_building_records.sh b/etl/update_building_records.sh index be92ca03..96753396 100644 --- a/etl/update_building_records.sh +++ b/etl/update_building_records.sh @@ -18,9 +18,10 @@ # geometry_id serial PRIMARY KEY, # source_id varchar(30) # );" -psql -c "SELECT geometry_id, source_id - FROM geometries - WHERE source_id NOT IN ( SELECT ref_toid FROM buildings);" +psql -c "INSERT INTO new_geometries ( geometry_id, source_id ) + SELECT geometry_id, source_id + FROM geometries + WHERE source_id NOT IN ( SELECT ref_toid FROM buildings);" # for building in buildings