dosubot[bot] commented on issue #34879:
URL: https://github.com/apache/superset/issues/34879#issuecomment-3232420037

   <!-- Greeting -->
   Hi @adolfotcar! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the 
superset team.
   
   <!-- Answer -->
   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)](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/commands/dashboard/importers/v1/__init__.py)
 [(source)](https://github.com/apache/superset/issues/33659).
   
   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)](https://github.com/apache/superset/issues/33615).
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
   
   ---
   <sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/1b232f9c-4326-4d7b-993d-8907f8d5ee3f?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/1b232f9c-4326-4d7b-993d-8907f8d5ee3f?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/1b232f9c-4326-4d7b-993d-8907f8d5ee3f?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/1b232f9c-4326-4d7b-993d-8907f8d5ee3f?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/1b232f9c-4326-4d7b-993d-8907f8d5ee3f?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/1b232f9c-4326-4d7b-993d-8907f8d5ee3f?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/1b232f9c-4326-4d7b-993d-8907f8d5ee3f?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat
 with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=githu
 b)&nbsp;[![Join 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/34879)


-- 
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.

To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to