02-14-2023 04:35 AM
I am trying to copy a dashboard object from one workspace to another using API.
I am using Get dashboard objects (/api/2.0/preview/sql/dashboards GET method), then Retrieve a definition (/api/2.0/preview/sql/dashboards/{dashboard_id} GET method) and after retrieving a definition. Until this step, everything seems fine, but the last step in my opinion is somehow broken. I am trying to restore the dashboard using Create a dashboard object (/api/2.0/preview/sql/dashboards POST method). The engine will return 200 and the object created but the widgets are equal to None, so the object is created and visible on Dashboards screen but in fact, it is quite empty.
Can you help me?
04-09-2023 08:09 AM
@Mariusz Czak :
Here are a few things you can check:
Let me know if any of the above suggestions work for you, if not we can try and figure out more.
04-20-2023 02:23 AM
Hi @Mariusz Czak
Thank you for posting your question in our community! We are happy to assist you.
To help us provide you with the most accurate information, could you please take a moment to review the responses and select the one that best answers your question?
This will also help other community members who may have similar questions in the future. Thank you for your participation and let us know if you need any further assistance!
11-30-2023 01:41 AM
Any updates on this? I'm facing the same issue. I deleted the original dashboard and tried to recreate it with the template which at least would map the dashboard to the original resoureces. The result was the same that @Mist3 had.
02-02-2024 08:36 AM
I'm facing the same issue. I'm even trying to duplicate a dashboard on the same environment, which would rule out any issue of missing resources. The dashboard is created empty; no widgets. Either the API is broken or the documentation is misleading. From the docs:
"Other fields can be included when duplicating dashboards with this API"
02-05-2024 07:02 AM - edited 02-05-2024 07:02 AM
Hi there -
We recommend using the export/import API for moving Lakeview dashboards between workspaces. Documentation of the capability here.
We'll take a look at the current DBSQL dashboard GET/CREATE/UPDATE API and improve clarity there.
02-16-2024 12:53 PM
Hi @miranda_luna_db , unfortunately, when it comes to Lakeview dashboards, the workspace API documentation is equally confusing: check out my thread.
02-17-2024 03:02 PM
Will reply on that thread.
02-27-2024 12:55 AM
Hey @miranda_luna_db, is there any update or suggestions for the SQL dashboards (so not Lakeview).
I am experiencing exactly same behaviour when attempting to deploy dashboards through the API. I have first fetched an existing definition and I am attempting to create a new dashboard. Creating a dashboard succeeds but the "widgets" property is always null and thus the dashboards end up empty. I feel like my attempt is aligned with the create dashboard API documentation:
"Other fields can be included when duplicating dashboards with this API. Databricks does not recommend designing dashboards exclusively using this API."
The lakeview dashboards are not really an option at the moment for my team as they do not support query parameters.
02-29-2024 10:05 AM
Hi @markusk, unfortunately the issue you're running into is a limitation of the outgoing SQL dashboard APIs. You can create blank dashboards, but you cannot programmatically insert existing definitions.
The good news is we're currently running a preview for import/export APIs that addresses precisely this. The import/export APIs allow you to create new or override existing dashboards with an existing definition. If you'd like access, please work with your account team to get set up.
On the Lakeview front, parameter support is top of mind for us!
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