terrabrasilis / ams

AMS - Amazon Situation Room
GNU General Public License v3.0
0 stars 2 forks source link

Implement data update in the background process #100

Closed andre-carvalho closed 3 years ago

andre-carvalho commented 3 years ago

Implement data update in the background process for the new DETER tables in the AMS database. Two tables are affected by this process:

  1. deter.deter_all - data published in TerraBrasilis for authenticated users and extra columns of the aggregation;
  2. deter.deter_public - data published on TerraBrasilis for anonymous users and extra columns of the aggregation;

Three steps are required:

  1. Truncate table data;
  2. Enter data from SQL View;
  3. Update aggregate attributes using another SQL view;

The background process must be scheduled to run every day before the other existing process. New DETER tables must be created as a precondition to start this task.