Bug description
This bug is similar to #22127 but this happens via the UI and not from the API. When you import a dashboard via the UI, it will only update the dashboard but won't update the charts or the datasets associated with it. This is specially critical if you have multiple environments and need to move dashboards around,if you change your dataset you'd need to export/import the dataset, chart and then the dashboard but would also cause confusion if you export a dashboard to have a backup before doing changes.
How to reproduce the bug Export dashboard with chartA and datasetA Change the datasetA, adding or removing a column Change chartA to reflect the changes made to dataset Import the Zip exported in the first step Instead of reverting back to the state it was before datasetA and chartA were changed, it retains the changes
Expected results Expect that the dataset and chart would be reverted back and be identidcal to what was exported to the Zip.
Actual results Imported dashboard but won't touch the charts and datasets if they already exist.
Screenshots/recordings
No response
Superset version
5.0.0
Python version
3.11
Node version
16
Browser
Chrome
Additional context
No response
Checklist
- [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [x] 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.
Comment From: dosubot[bot]
Hi @adolfotcar! I'm Dosu and I’m helping the superset team.
This behavior is expected in Superset 5.0.0: when importing a dashboard via the UI, only the dashboard itself is overwritten if it already exists—charts and datasets referenced by the dashboard are always imported with overwrite=False
, so any existing charts or datasets are left unchanged, even if their definitions differ from those in the import bundle. This is hardcoded in the backend import logic and applies regardless of the dashboard overwrite flag. As a result, restoring a dashboard to a previous state using the UI will not revert associated charts or datasets to their exported versions if they already exist in the target environment.
If you need to fully restore dashboards, charts, and datasets, you must delete the existing charts and datasets before import, or use the API (which supports an explicit overwrite
flag for charts) or CLI tools for more granular control. This limitation is documented in the code and has been discussed in the community, but there is currently no UI option to overwrite charts and datasets during dashboard import (source) (source).
Workarounds include manually deleting or renaming existing charts/datasets before import, or using automation/scripts to handle the process. If you need to regenerate chart query contexts after import, you must open and save each chart in the UI or automate this step (source).
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
Comment From: seanfulton
Using 5.0.0 I just exported a dashboard from one 5.0.0 install, imported it into another. The new install was clean-no charts, dashboards or data sources. In the zip file we changed the datasources from old to new, but didn't touch the charts. After importing, most of the charts are missing.
I have tried superset export-dashboards and that will only export ALL dashboards and charts from the donor install, which is not what I want.
What is the recommended way to copy a dashboard with all its charts and data sources from one install to another? I can find nothing. We used the UI-based export/import with 3.0.1, but now it appears to be broken/useless.