dashboards
Creates, updates, deletes, gets or lists a dashboards
resource.
Overview
Name | dashboards |
Type | Resource |
Id | databricks_workspace.lakeview.dashboards |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Request completed successfully.
Name | Datatype | Description |
---|---|---|
dashboard_id | string | |
warehouse_id | string | |
display_name | string | |
create_time | string | |
etag | string | |
lifecycle_state | string | |
parent_path | string | |
path | string | |
serialized_dashboard | string | |
update_time | string |
Request completed successfully.
Name | Datatype | Description |
---|---|---|
dashboard_id | string | |
warehouse_id | string | |
display_name | string | |
create_time | string | |
lifecycle_state | string |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | deployment_name | Get a draft dashboard. | |
list | select | deployment_name | ||
create | insert | deployment_name | Create a draft dashboard. | |
update | update | deployment_name | Update a draft dashboard. | |
trash | delete | deployment_name | Trash a dashboard. | |
migrate | exec | deployment_name | Migrates a classic SQL dashboard to Lakeview. | |
publish | exec | deployment_name | Publish the current draft dashboard. | |
unpublish | exec | deployment_name | Unpublish the dashboard. |
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
Get a draft dashboard.
SELECT
dashboard_id,
warehouse_id,
display_name,
create_time,
etag,
lifecycle_state,
parent_path,
path,
serialized_dashboard,
update_time
FROM databricks_workspace.lakeview.dashboards
WHERE deployment_name = '{{ deployment_name }}' -- required;
Request completed successfully.
SELECT
dashboard_id,
warehouse_id,
display_name,
create_time,
lifecycle_state
FROM databricks_workspace.lakeview.dashboards
WHERE deployment_name = '{{ deployment_name }}' -- required;
INSERT
examples
- create
- Manifest
Create a draft dashboard.
INSERT INTO databricks_workspace.lakeview.dashboards (
data__display_name,
data__warehouse_id,
data__etag,
data__serialized_dashboard,
data__parent_path,
deployment_name
)
SELECT
'{{ display_name }}',
'{{ warehouse_id }}',
'{{ etag }}',
'{{ serialized_dashboard }}',
'{{ parent_path }}',
'{{ deployment_name }}'
RETURNING
dashboard_id,
warehouse_id,
display_name,
create_time,
etag,
lifecycle_state,
parent_path,
path,
serialized_dashboard,
update_time
;
# Description fields are for documentation purposes
- name: dashboards
props:
- name: deployment_name
value: string
description: Required parameter for the dashboards resource.
- name: display_name
value: string
- name: warehouse_id
value: string
- name: etag
value: string
- name: serialized_dashboard
value: string
- name: parent_path
value: string
UPDATE
examples
- update
Update a draft dashboard.
UPDATE databricks_workspace.lakeview.dashboards
SET
data__display_name = '{{ display_name }}',
data__warehouse_id = '{{ warehouse_id }}',
data__etag = '{{ etag }}',
data__serialized_dashboard = '{{ serialized_dashboard }}'
WHERE
deployment_name = '{{ deployment_name }}' --required
RETURNING
dashboard_id,
warehouse_id,
display_name,
create_time,
etag,
lifecycle_state,
parent_path,
path,
serialized_dashboard,
update_time;
DELETE
examples
- trash
Trash a dashboard.
DELETE FROM databricks_workspace.lakeview.dashboards
WHERE deployment_name = '{{ deployment_name }}' --required;
Lifecycle Methods
- migrate
- publish
- unpublish
Migrates a classic SQL dashboard to Lakeview.
EXEC databricks_workspace.lakeview.dashboards.migrate
@deployment_name='{{ deployment_name }}' --required
@@json=
'{
"source_dashboard_id": "{{ source_dashboard_id }}",
"display_name": "{{ display_name }}",
"parent_path": "{{ parent_path }}",
"update_parameter_syntax": "{{ update_parameter_syntax }}"
}';
Publish the current draft dashboard.
EXEC databricks_workspace.lakeview.dashboards.publish
@deployment_name='{{ deployment_name }}' --required
@@json=
'{
"embed_credentials": {{ embed_credentials }},
"warehouse_id": "{{ warehouse_id }}"
}';
Unpublish the dashboard.
EXEC databricks_workspace.lakeview.dashboards.unpublish
@deployment_name='{{ deployment_name }}' --required;