vw_budget_policies
Creates, updates, deletes, gets or lists a vw_budget_policies resource.
Overview
| Name | vw_budget_policies |
| Type | View |
| Id | databricks_account.billing.vw_budget_policies |
Fields
The following fields are returned by this view:
| Name | Datatype | Description |
|---|---|---|
account_id | string | Databricks account ID used to scope the query. |
policy_id | string | Unique identifier for the budget policy. |
policy_name | string | Display name of the budget policy. |
custom_tags | object | Key-value custom tags associated with the budget policy. |
binding_workspace_id | string | ID of a workspace bound to this budget policy (one row per workspace). |
Required Parameters
The following parameters are required by this view:
| Name | Datatype | Description |
|---|---|---|
account_id | string | Databricks account ID used to scope the query. |
SELECT Examples
SELECT
account_id,
policy_id,
policy_name,
custom_tags,
binding_workspace_id
FROM databricks_account.billing.vw_budget_policies
WHERE account_id = '{{ account_id }}';
SQL Definition
- Sqlite3
- Postgres
SELECT
p.account_id,
p.policy_id,
p.policy_name,
p.custom_tags,
w.value AS binding_workspace_id
FROM databricks_account.billing.budget_policy p,
JSON_EACH(p.binding_workspace_ids) w
WHERE account_id = '{{ account_id }}'
SELECT
p.account_id,
p.policy_id,
p.policy_name,
p.custom_tags,
w.value AS binding_workspace_id
FROM databricks_account.billing.budget_policy p,
jsonb_array_elements(p.binding_workspace_ids::jsonb) AS w
WHERE account_id = '{{ account_id }}'