feat: store query context when saving charts#15824
Merged
betodealmeida merged 3 commits intoapache:masterfrom Jul 21, 2021
Merged
feat: store query context when saving charts#15824betodealmeida merged 3 commits intoapache:masterfrom
betodealmeida merged 3 commits intoapache:masterfrom
Conversation
eschutho
approved these changes
Jul 21, 2021
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.
|
This was referenced Jul 21, 2021
cccs-RyanS
pushed a commit
to CybercentreCanada/superset
that referenced
this pull request
Dec 17, 2021
* WIP * Add migration * Fix tests
QAlexBall
pushed a commit
to QAlexBall/superset
that referenced
this pull request
Dec 29, 2021
* WIP * Add migration * Fix tests
9 tasks
cccs-rc
pushed a commit
to CybercentreCanada/superset
that referenced
this pull request
Mar 6, 2024
* WIP * Add migration * Fix tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SUMMARY
This PR adds a new column to the
slicestable 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/dataendpoint. Since the query context is built by each visualization fromslices.paramsvia 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_contextcolumn:ADDITIONAL INFORMATION