cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Can we migrate Databricks SQL components such as queries, dashboards etc from one workspace to another?

Anonymous
Not applicable
 
8 REPLIES 8

aladda
Databricks Employee
Databricks Employee

Not currently as the queries, dashboards etc are likely tied to the underlying tables/dataset so the migration probably extends beyond just those artifacts. Would be helpful to understand your use case

sajith_appukutt
Honored Contributor II

Queries and Dashboards API provides the functionality to list existing queries / dashboards . Perhaps use this functionality to automate migration of queries.

If you want to migrate table definitions from the metastore as well - check out https://github.com/databrickslabs/migrate

Valentin1
New Contributor III

We are currently trying to do the same thing, meaning to deploy from Dev to Qa/Prod the queries and dashboards.

For queries it is possible, We tested this in a python script and the queries were successfully recreated in the new environment . I am not sure how to fix the links to the data sources yet.

For the dashboards, it does not work as the widgets are ignored/not parsed when I tried to call the API to create a dashboard. Just an empty dashboard is created. I even tried a simple dashboards with a single text widget and it still didn't work. Maybe it will after this gets out of the preview.

Hi Valentin1, 

We have similar use-case. We created a separate workspaces for Dev and QA, following this Databricks Blog Post. We are able to export and import queries from Dev to QA using the queries api, but this is not working for dashboards. 

Can you tell me what approach you took finally to migrate the assets across workspace?

 

Anonymous
Not applicable

Hi @sajith_appukutt 

Hope all is well! Just wanted to check in if you were able to resolve your issue and would you be happy to share the solution or mark an answer as best? Else please let us know if you need more help. 

We'd love to hear from you.

Thanks!

joseheliomuller
New Contributor III

The ability to easily migrate queries and dashboards across Databricks Workspace it extremely important.

In my company we have dev, stg and production workspaces, with same pipeline creating the data.

We create our dashboards in DEV and then we have to redo MANUALLY in staging and production workspace!

Now it has been released that Databricks will enforce to save the queries in the Shared folder and not in repos anymore.

Not been able to save the queries in a version control or able to migrate dashboards across environments is such a bad move of Databricks, it is basically forcing us to use another tool such as Tableau or Power BI.

Is there any place I can raise a ticket or a request to allow queries and dashboards to be in repos and ability to migrate them across different workspaces?

djhs
New Contributor III

I'm currently also struggling with moving dashboards from our dev workspace to our prod workspace using the Databricks API in our CI/CD pipelines. Simply being able to create a dashboard with a json spec (exported through the Databricks API) would solve my issue and potentially from many others who responded to this issue.

djhs
New Contributor III

I also tried to leverage this endpoint (inferred from devtools): https://<workspace_id>.cloud.databricks.com/sql/api/dashboards/import with the exported dashboard (the dbdash file) in the request payload. It returns a 200 but nothing happens. Maybe someone else knows how to hack around this.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group