Skip to main content

dashboard_widgets

Creates, updates, deletes, gets or lists a dashboard_widgets resource.

Overview

Namedashboard_widgets
TypeResource
Iddatabricks_workspace.sql.dashboard_widgets

Fields

The following fields are returned by SELECT queries:

SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
updateinsertid, deployment_name, dashboard_id, options, widthUpdates an existing widget
createinsertdeployment_name, dashboard_id, options, widthAdds a widget to a dashboard
deletedeleteid, deployment_nameRemoves a widget from a 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.

NameDatatypeDescription
deployment_namestringThe Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc)
idstringWidget ID returned by :method:dashboardwidgets/create

INSERT examples

Updates an existing widget

INSERT INTO databricks_workspace.sql.dashboard_widgets (
dashboard_id,
options,
width,
text,
visualization_id,
id,
deployment_name
)
SELECT
'{{ dashboard_id }}' /* required */,
'{{ options }}' /* required */,
{{ width }} /* required */,
'{{ text }}',
'{{ visualization_id }}',
'{{ id }}',
'{{ deployment_name }}'
RETURNING
id,
options,
visualization,
width
;

DELETE examples

Removes a widget from a dashboard

DELETE FROM databricks_workspace.sql.dashboard_widgets
WHERE id = '{{ id }}' --required
AND deployment_name = '{{ deployment_name }}' --required
;