ConservationMetrics / guardianconnector-views

A Nuxt.js tool that reads data from a SQL database and renders it on different views (map, gallery, alerts dashboard)
MIT License
3 stars 0 forks source link

Update expected data keys based on recent warehouse normalization changes #1

Closed rudokemper closed 9 months ago

rudokemper commented 10 months ago
IamJeffG commented 10 months ago

You may know this but the changes related to p__ prefix and geometry separator are all captured in the new {table}__columns table. So if guardianconnector-map is going to look into that table already, then it won't need to also encode its own special rules about p__ and geometry.

IamJeffG commented 9 months ago

In https://github.com/ConservationMetrics/frizzle/issues/99 I was able to migrate kawana and bcm deployments without changing most of the table column names. There were a couple changes even in these but I'd imagine they are immaterial to you: (i) drop "type" column, (ii) rename p___id to _id. But the other columns should be unchanged from before.

On the other hand, this means that different deployments now use different heuristics (from each other) to generate column names. So ultimately, for property naming, guardianconnector-map needs to look up the *__columns table.

Note that the geometry columns have remained unchanged from before and also will remain constant between different deployments: this might help you keep things simple here in this repo.

rudokemper commented 9 months ago

Sounds good. I will rework this repo to use the column names table after we finish the other migration tasks, and once we figure out authenticated access to media attachment files. (I'll handle both in the same batch of work.)