terrabrasilis / ams

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

Backend task error in Cerrado database #188

Closed andre-carvalho closed 3 months ago

andre-carvalho commented 4 months ago

The backend task is stopping due to a workflow error when the biome is Cerrado.

The error message is:

Insert ibama risk in land use tables for each spatial units.
Error on classify by land_structure, deter and fires
(psycopg2.errors.UndefinedTable) relation "tmp_risk_land_structure" does not exist
LINE 3:         FROM tmp_risk_land_structure a 
                     ^

[SQL:  
        SELECT a.id, a.land_use_id, a.num_pixels, 'RK' as classname, b.risk, b.view_date as date, b.geom as geometry
        FROM tmp_risk_land_structure a 
        INNER JOIN public.last_risk_data b 
        ON a.gid = b.id]
(Background on this error at: https://sqlalche.me/e/20/f405)
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1971, in _exec_single_context
    self.dialect.do_execute(
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 919, in do_execute
    cursor.execute(statement, parameters)
psycopg2.errors.UndefinedTable: relation "tmp_risk_land_structure" does not exist
LINE 3:         FROM tmp_risk_land_structure a 
andre-carvalho commented 4 months ago

Even with the settings:

    environment:
      - "BIOME=Cerrado"