namibmap / IPPR

2 stars 1 forks source link

Create a script to update the tables in CartoDB based on Flexicadastre changes #43

Open ruta-goomba opened 9 years ago

ruta-goomba commented 9 years ago

Raquel: ' The cron job should update the data in CartoDB. Then, in turn, response.json can be populated, but always from CartoDB, not directly done in the cronjob. There is a way to insert data in CartoDB from a script using UPDATE SQL queries. For example: http://gis.stackexchange.com/questions/94982/what-is-the-simplest-way-to-write-data-to-cartodb-using-python

It's also posible to do it with NodeJS, and I'm sure other technologies. We can decide later on which to choose.

Does this sound fine?

The data flow would be:

Flexicadastre changes
Cronjob run daily (for example) detects flexicadastre changed
Cronjob calls script to update the tables in CartoDB
response.json gets reloaded. This depends on where the queries are done from. If it's from the front end, then response.json is not really necessary at all. As soon as the data is updated, the next user that load the map will get the latest data. If we want to do it from the back-end, we just rewrite response.json.'
raquelalegre commented 9 years ago

As I asked in #42 we need to know how you have created the new DB schema we are currently using @lbewlay so we can replicate it or automate it for this issue. We also need to work out for which milestone this should be done. I suggest January (Mudumu), the earliest.