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
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