dashboards
Creates, updates, deletes, gets or lists a dashboards
resource.
Overview
Name | dashboards |
Type | Resource |
Id | databricks_workspace.dbsql.dashboards |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Dashboard fetched successfully.
Name | Datatype | Description |
---|---|---|
id | string | |
name | string | |
user_id | integer | |
can_edit | boolean | |
created_at | string | |
dashboard_filters_enabled | boolean | |
is_archived | boolean | |
is_draft | boolean | |
is_favorite | boolean | |
options | object | |
parent | string | |
permission_tier | string | |
slug | string | |
tags | array | |
updated_at | string | |
user | object | |
widgets | array |
Name | Datatype | Description |
---|---|---|
id | string | |
name | string | |
user_id | integer | |
can_edit | boolean | |
created_at | string | |
dashboard_filters_enabled | boolean | |
is_archived | boolean | |
is_draft | boolean | |
is_favorite | boolean | |
options | object | |
parent | string | |
permission_tier | string | |
slug | string | |
tags | array | |
updated_at | string | |
user | object | |
widgets | array |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | deployment_name | Returns a JSON representation of a dashboard object, including its visualization and query objects. | |
list | select | deployment_name | Fetch a paginated list of dashboard objects. | |
create | insert | deployment_name | ||
update | update | deployment_name | Modify this dashboard definition. This operation only affects attributes of the dashboard object. It does not add, modify, or remove widgets. | |
delete | delete | deployment_name | Moves a dashboard to the trash. Trashed dashboards do not appear in list views or searches, and cannot be shared. | |
restore | exec | deployment_name | A restored dashboard appears in list views and searches and can be shared. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
deployment_name | string | The Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc) |
SELECT
examples
- get
- list
Returns a JSON representation of a dashboard object, including its visualization and query objects.
SELECT
id,
name,
user_id,
can_edit,
created_at,
dashboard_filters_enabled,
is_archived,
is_draft,
is_favorite,
options,
parent,
permission_tier,
slug,
tags,
updated_at,
user,
widgets
FROM databricks_workspace.dbsql.dashboards
WHERE deployment_name = '{{ deployment_name }}' -- required;
Fetch a paginated list of dashboard objects.
SELECT
id,
name,
user_id,
can_edit,
created_at,
dashboard_filters_enabled,
is_archived,
is_draft,
is_favorite,
options,
parent,
permission_tier,
slug,
tags,
updated_at,
user,
widgets
FROM databricks_workspace.dbsql.dashboards
WHERE deployment_name = '{{ deployment_name }}' -- required;
INSERT
examples
- create
- Manifest
No description available.
INSERT INTO databricks_workspace.dbsql.dashboards (
data__name,
data__parent,
data__tags,
data__is_favorite,
data__run_as_role,
data__dashboard_filters_enabled,
deployment_name
)
SELECT
'{{ name }}',
'{{ parent }}',
'{{ tags }}',
'{{ is_favorite }}',
{{ run_as_role }},
'{{ dashboard_filters_enabled }}',
'{{ deployment_name }}'
RETURNING
id,
name,
user_id,
can_edit,
created_at,
dashboard_filters_enabled,
is_archived,
is_draft,
is_favorite,
options,
parent,
permission_tier,
slug,
tags,
updated_at,
user,
widgets
;
# Description fields are for documentation purposes
- name: dashboards
props:
- name: deployment_name
value: string
description: Required parameter for the dashboards resource.
- name: name
value: required
- name: parent
value: string
- name: tags
value: string
- name: is_favorite
value: Array of string
- name: run_as_role
value: boolean
- name: dashboard_filters_enabled
value: string
UPDATE
examples
- update
Modify this dashboard definition. This operation only affects attributes of the dashboard object. It does not add, modify, or remove widgets.
UPDATE databricks_workspace.dbsql.dashboards
SET
data__name = '{{ name }}',
data__run_as_role = '{{ run_as_role }}',
data__tags = '{{ tags }}'
WHERE
deployment_name = '{{ deployment_name }}' --required
RETURNING
id,
name,
user_id,
can_edit,
created_at,
dashboard_filters_enabled,
is_archived,
is_draft,
is_favorite,
options,
parent,
permission_tier,
slug,
tags,
updated_at,
user,
widgets;
DELETE
examples
- delete
Moves a dashboard to the trash. Trashed dashboards do not appear in list views or searches, and cannot be shared.
DELETE FROM databricks_workspace.dbsql.dashboards
WHERE deployment_name = '{{ deployment_name }}' --required;
Lifecycle Methods
- restore
A restored dashboard appears in list views and searches and can be shared.
EXEC databricks_workspace.dbsql.dashboards.restore
@deployment_name='{{ deployment_name }}' --required;