tagbase / tagbase-server

tagbase-server is a data management web service for working with eTUFF and nc-eTAG files.
https://oiip.jpl.nasa.gov/doc/OIIP_Deliverable7.4_TagbasePostgreSQLeTUFF_UserGuide.pdf
Apache License 2.0
7 stars 2 forks source link

Cannot create successive materialized views #229

Open lewismc opened 1 year ago

lewismc commented 1 year ago

After we ingest files, we can only execute the tagbase_materialized_views.sql one time. This is a bug. We should be able to execute it multiple times. This should also be a stored procedure such that a DB admin can execute it via pgAdmin.

renato2099 commented 1 year ago

I am not quite following the problem here @lewismc . The SQL file tagbase_materialized_views.sql contains the definition of the materialized files. This definition is expected to be executed once. Then users can query (i.e., execute SELECT statements) on them.

lewismc commented 1 year ago

Today we determine that the empty materialized views should be created upon DB initialization. Any data movement is then merely an update of one or more of the views. This could be implemented as a REST API as well as a stored procedures. Any subsequent updates need to REFRESH MATERIALIZED VIEW.