graceguo-supercat opened a new pull request #9311: [cache warm_up] warm_up slice with dashboard default_filters URL: https://github.com/apache/incubator-superset/pull/9311 ### CATEGORY Choose one - [x] Bug Fix - [x] Enhancement (new features, refinement) - [ ] Refactor - [ ] Add tests - [ ] Build / Development Environment - [ ] Documentation ### SUMMARY Superset offers a cache warm_up endpoint: https://github.com/apache/incubator-superset/blob/8764ae385206c8bdccba1e7aa42def1929f6fba7/superset/views/core.py#L1645 It will generate a query like `form_data={slice_id: _slice_id_}` so that we can warm_up query saved with a given slice_id. Now a lot dashboard are having default filters (and filters can have scopes), warm_up single slice without dashboard context make our cache hit rate declining. Currently in airbnb we have 10% dashboard with default filters, but 20% of dashboards are landed with default_filters. This PR is to add dashboard context into the cache warm_up call. You can pass extra dashboard_id parameter to `wam_up` API, indicating the slice is called with a given dashboard. It should generate a query like ``` form_data = {"slice_id":926, "extra_filters": [ { "col": "region", "op": "in", "val": [ "East Asia & Pacific", "Latin America & Caribbean" ] } ]} ``` ### TEST PLAN added new unit tests ### REVIEWERS @john-bodley @serenajiang @etr2460
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
