'Duplicate a Superset dashboard, then replace its dataset source at once?

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?



Solution 1:[1]

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.

Solution 2:[2]

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

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 suddjian
Solution 2 Connor Dibble