-
Notifications
You must be signed in to change notification settings - Fork 14.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: store query context when saving charts #15824
feat: store query context when saving charts #15824
Conversation
Codecov Report
@@ Coverage Diff @@
## master #15824 +/- ##
==========================================
- Coverage 77.14% 76.90% -0.25%
==========================================
Files 984 984
Lines 51662 51670 +8
Branches 6991 6991
==========================================
- Hits 39855 39736 -119
- Misses 11583 11710 +127
Partials 224 224
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
* WIP * Add migration * Fix tests
* WIP * Add migration * Fix tests
* WIP * Add migration * Fix tests
SUMMARY
This PR adds a new column to the
slices
table calledquery_context
. It also modifies Explore to save the query context to this column whenever a chart is saved.Having the query context is needed in order to generate data for a saved chart with the
api/v1/char/data
endpoint. Since the query context is built by each visualization fromslices.params
via Javascript, there's currently no way to fetch data for a given chart from Python.With the new column we will be able to generate CSV reports for new (JS-only) charts, like the pivot table v2.
The migration script only adds the column, but doesn't populate it for existing charts since that would be too expensive and complex.
Migration benchmark:
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A
TESTING INSTRUCTIONS
Save a chart and check the
slices.query_context
column:ADDITIONAL INFORMATION