Is there an any example that contains at least one widget that works with the Databricks SQL Create Dashboard API? I tried the following simple dashboard:
{
"name": "Delta View",
"dashboard_filters_enabled": false,
"widgets": [
{
"width": 1,
"options": {
"isHidden": false,
"position": {
"autoHeight": false,
"sizeX": 3,
"sizeY": 3,
"minSizeX": 1,
"maxSizeX": 6,
"minSizeY": 1,
"maxSizeY": 1000,
"col": 0,
"row": 0
}
},
"text": "21221"
}
],
"is_draft": false,
"tags": []
}
and no widgets are actually created/added to the dashboard. The output looks like this:
{
"id": "89b2fb34-1647-4ae1-94a8-692cf6293eec",
"slug": "delta-view",
"name": "Delta View",
"user_id": <redacted>,
"data_source_id": null,
"dashboard_filters_enabled": false,
"widgets": null,
"options": {
"refresh_schedules": []
},
"is_draft": false,
"tags": [],
"updated_at": "2022-08-08T13:22:43Z",
"created_at": "2022-08-08T13:22:43Z",
"version": 1,
"user": {
"id": <redacted>,
"name": "<redacted>",
"email": "<redacted>",
"profile_image_url": "<redacted>",
"is_db_admin": false
},
"refresh_schedules": [],
"color_palette": null,
"run_as_role": null,
"run_as_service_principal_id": null,
"is_favorite": false,
"is_archived": false
}
It can be observed that the "widgets" field becomes null even for this simple example. The Databricks API documentation (https://docs.databricks.com/sql/api/queries-dashboards.html) says that widgets are possible but no good example is given, just the one where the widgets field is an empty array.
I understand that this is a public preview and not all the things might work as expected, but this seem to us as a huge letdown as we cannot deploy our dashboards to other environments unless we manually recreate them each time there is a change.
We would like to automatically deploy our dashboards from one environment to another but for now there doesn't seem to be any way we can do this. We would appreciate your help with this issue. Thank you!