diff --git a/etl/update_building_records.sh b/etl/update_building_records.sh index a3cb803f..42e1edac 100644 --- a/etl/update_building_records.sh +++ b/etl/update_building_records.sh @@ -14,18 +14,17 @@ # if geometry.TOID not in builings # Add TOID to temp table called new_geometries -psql -c "CREATE TABLE new_geometries ( - geometry_id serial PRIMARY KEY, - source_id varchar(30) -);" +# psql -c "CREATE TABLE new_geometries ( +# geometry_id serial PRIMARY KEY, +# source_id varchar(30) +# );" psql -c "WITH new_geometries AS ( INSERT INTO buildings ( geometry_id, ref_toid ) SELECT geometry_id, source_id FROM geometries ON CONFLICT ( ref_toid ) DO NOTHING RETURNING * - ) -;" + );" # for building in buildings