goat-community / goat

This is the home of Geo Open Accessibility Tool (GOAT)
GNU General Public License v3.0
93 stars 51 forks source link

SQLAlchemy function to import new data from foreign table #1671

Closed metemaddar closed 1 month ago

metemaddar commented 2 years ago

As an example: grid_calculation and grid_visualization tables have a table mapping to remote db (geonode database). We need a function to import data from these two tables from foreign server (geonode database) to the client tables. Related issue: #1473

Branch to derive

feature/chapar

metemaddar commented 2 years ago

The following function is used to import new data:

https://github.com/goat-community/goat/blob/afe7c7e1462c50aa1c81b7c71cc350c29570b12a/app/api/src/db/sql/init_remote_table.py#L128-L142

@EPajares It was tested and worked for grid_visualization and grid_calculation

metemaddar commented 2 years ago

@EPajares It can be tested also with the following code:

https://github.com/goat-community/goat/blob/afe7c7e1462c50aa1c81b7c71cc350c29570b12a/app/api/src/db/sql/init_remote_table.py#L145-L154