akvo / akvo-lumen

Make sense of your data
https://akvo.org/akvo-lumen
GNU Affero General Public License v3.0
63 stars 18 forks source link

[#3158] Aggregation temp views (except map types) #3160

Closed tangrammer closed 2 years ago

tangrammer commented 2 years ago

This approach is to use temporary and dynamic db views for all aggregations but map types.

Using specs to extrac col-names from aggregation query payload (Follows same auth approach https://github.com/akvo/akvo-lumen/blob/master/backend/src/akvo/lumen/lib/auth.clj#L215-L231) we derive the data-groups used in the aggregation and then build a temp view (previously we changed temp views to persisted views thus map aggregations needs to be called from external windshaft service) Map aggregations keeps the same (persistent and complete dataset db views) ... perhaps we'd need to change the approach in the future too