You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The "view as table" view does not update it's content past the first interaction, when the same query is used (including filter options, like time range), within the caching window when caching is enabled.
Whilst the graphs/slices seem to use the cache accordingly and update their content on dashboard refreshes, the "view as table" option does not.
How to reproduce the bug
Enabled cahing in superset_config.py.
I have the following cache settings enabled: DATA_CACHE_CONFIG = { 'CACHE_TYPE: 'SimpleCache', 'CACHE_DEFAULT_TIMEOUT': 60*60*24, 'CACHE_THRESHOLD': 10000, }
Go to a dashboard and select "view as table" on a graph/slice.
Close the "view as table" pop up.
Wait until the dashboard has been refreshed, or force refresh it yourself, and until new data has been received for the relevant graph/slice.
Without changing the query (including filter options), select "view as table" on the same graph/slice as before.
The presented data should by the same as the first time "view as table" was viewed.
Screenshots/recordings
First interaction with "view as table" in caching window:
Second interaction with "view as table" in caching window on same graph after dashboard refresh with new data:
Superset version
4.0.1
Python version
3.9
Node version
16
Browser
Chrome
Additional context
No response
Checklist
I have searched Superset docs and Slack and didn't find a solution to my problem.
I have searched the GitHub issue tracker and didn't find a similar bug report.
I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
The text was updated successfully, but these errors were encountered:
It looks like the issue with the "view as table" feature not updating correctly in Superset might be related to how the feature interacts with the caching mechanism and how component updates are managed. Here are some targeted steps to troubleshoot and potentially resolve the issue:
Ensure Proper Triggering of Refresh: Check that the forceRefresh method is correctly invoked to force a refresh of the chart. This method should be called with the appropriate parameters to ensure the table content is updated.
Verify Chart Container Updates: Make sure the ChartContainer component, which renders the chart content including the "view as table" option, receives updated props that trigger a re-render when new data is available.
Check for Prop Changes: In the Chart component, ensure that the shouldComponentUpdate method correctly identifies changes in data that should trigger a table update. This may involve adding logic to detect changes to queriesResponse or related data props.
Debugging and Logging: Utilize logging to debug and track when refreshes are requested and when data is expected to update. This can help identify if the issue lies in not triggering updates or if updates are triggered but not reflected in the UI.
Review Caching Logic: Review how caching is handled for the "view as table" data, especially ensuring that the cache is correctly invalidated or bypassed on a forced refresh.
If following these steps does not resolve the issue, it might be indicative of a bug in the Superset codebase, which could warrant further investigation or reporting as a new issue.
About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
Bug description
The "view as table" view does not update it's content past the first interaction, when the same query is used (including filter options, like time range), within the caching window when caching is enabled.
Whilst the graphs/slices seem to use the cache accordingly and update their content on dashboard refreshes, the "view as table" option does not.
How to reproduce the bug
Enabled cahing in superset_config.py.
I have the following cache settings enabled:
DATA_CACHE_CONFIG = { 'CACHE_TYPE: 'SimpleCache', 'CACHE_DEFAULT_TIMEOUT': 60*60*24, 'CACHE_THRESHOLD': 10000, }
Go to a dashboard and select "view as table" on a graph/slice.
Close the "view as table" pop up.
Wait until the dashboard has been refreshed, or force refresh it yourself, and until new data has been received for the relevant graph/slice.
Without changing the query (including filter options), select "view as table" on the same graph/slice as before.
The presented data should by the same as the first time "view as table" was viewed.
Screenshots/recordings
First interaction with "view as table" in caching window:
Second interaction with "view as table" in caching window on same graph after dashboard refresh with new data:
Superset version
4.0.1
Python version
3.9
Node version
16
Browser
Chrome
Additional context
No response
Checklist
The text was updated successfully, but these errors were encountered: