Copy Dashboard

Hi there

Is it possible to duplicate the dashboard and edit ?

Regards
Jayanthan

Only by running some SQL against the metabase database.
First, you need to know the id of the dashboard - when viewing the dashboard, you’ll see a number at the end of the url - that’s the dashboard id.
In my case, it’s 3: http://jasperc:3000/dashboard/3
In everything that follows, make sure you replace the 3 with your dashboard’s id.

First, create the copy of the dashboard (this won’t add the questions, that comes later):

insert into report_dashboard (created_at, updated_at,name, description,creator_id, parameters)
select now(),now(), concat(name , ' copy'), description,creator_id, parameters from report_dashboard where id=3;

In Metabase, you’ll now have an extra dashboard with the same name as the original, but with (copy) at the end of the name.
Get the id of this dashboard (in my case it was 8).

Now you need to create copies of each of the questions-dashboard relationships (this isn’t duplicating questions, just their use inthe dashboards). Don’t forget to replace the 3 and the 8 with your values:

insert into report_dashboardcard (created_at, updated_at, sizeX, sizeY, row, col, card_id, dashboard_id, parameter_mappings, visualization_settings)
select now(), now(), sizeX, sizeY, row, col, card_id, 8, parameter_mappings, visualization_settings from report_dashboardcard where dashboard_id=3;

Job done.

1 Like

Hi Andrew

Thank you , i will check and get back to you

Regards
Jayanthan

Hi @AndrewMBaines
How we enter this quarry .? Is possible add this quarry into quarry editor

You need to use whatever query designer or sql environment you have available. I’m using MySQL for my Metabase database, so I just use MySQL Workbench.