nismod / infra-risk-vis

Risk analysis visualisation tool
https://global.infrastructureresilience.org
MIT License
10 stars 1 forks source link

ETL update or create #163

Closed thomas-fred closed 3 months ago

thomas-fred commented 1 year ago

Metadata creation in postgres: Allow for create or update operation when posting to backend to create table metadata in postgreSQL, currently this operation returns 4XX if the table metadata already exists.

tomalrussell commented 3 months ago

ETL now works against the database directly rather than via the backend API.

See notes in README on dropping terracotta metadata databases before ingesting raster layers (the ingest.py script will keep going if the database already exists and just try skipping any already-ingested layers).

The ingest_metadata.py script will now delete any rows from raster_tile_sources with the current domain before attempting an insert, which is effectively create or (delete then create) update.