I am using Superset for data visualisation and I'm used to upload a csv file for each dataset I need. My issue is when I want to duplicate a dashboard and replace the datasource only for the copied dashboard. In practice I export the dashboard that I want to copy, then import it, and change the dataset for each graph of the dashboard. This task can be quite time-consuming and I would like to know if there is any way to change the dataset source in the duplicated dashboard for all its graphs at once?
Dashboards are exported as a zipped archive of yaml files. You could use a text editor to find-and-replace the dataset id in the exported files before importing.
You can also just open the existing Dashboard and then Save As. This provides an option to also duplicate the underlying Charts (or not). See: https://github.com/apache/superset/issues/4963
Suddjian's answer about replacing uuids is on the right track, but charts have a "datasource" parameter that is unique to the underlying dataset. This "datasource" parameter doesn't seem to be part of the exported dataset metadata. It is assigned when the dataset is created, though it can be modified (thru the UI, at least).
Dashboards are exported as a zipped archive of yaml files. You could use a text editor to find-and-replace the dataset id in the exported files before importing.
© 2022 - 2024 — McMap. All rights reserved.