Skip to main content

usage_dashboards

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

Overview

Nameusage_dashboards
TypeResource
Iddatabricks_account.billing.usage_dashboards

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
dashboard_idstring
dashboard_urlstringThe URL of the usage dashboard.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
usage_dashboards_getselectaccount_iddashboard_type, workspace_idGet a usage dashboard specified by workspaceId, accountId, and dashboard type.
usage_dashboards_createinsertaccount_idCreate a usage dashboard specified by workspaceId, accountId, and dashboard type.

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
account_idstring
dashboard_typestringWorkspace level usage dashboard shows usage data for the specified workspace ID. Global level usage dashboard shows usage data for all workspaces in the account.
workspace_idintegerThe workspace ID of the workspace in which the usage dashboard is created.

SELECT examples

Get a usage dashboard specified by workspaceId, accountId, and dashboard type.

SELECT
dashboard_id,
dashboard_url
FROM databricks_account.billing.usage_dashboards
WHERE account_id = '{{ account_id }}' -- required
AND dashboard_type = '{{ dashboard_type }}'
AND workspace_id = '{{ workspace_id }}'
;

INSERT examples

Create a usage dashboard specified by workspaceId, accountId, and dashboard type.

INSERT INTO databricks_account.billing.usage_dashboards (
dashboard_type,
major_version,
workspace_id,
account_id
)
SELECT
'{{ dashboard_type }}',
'{{ major_version }}',
{{ workspace_id }},
'{{ account_id }}'
RETURNING
dashboard_id
;