Skip to main content

vw_budget_alert_actions

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

Overview

Namevw_budget_alert_actions
TypeView
Iddatabricks_account.billing.vw_budget_alert_actions

Fields

The following fields are returned by this view:

NameDatatypeDescription
account_idstringDatabricks account ID used to scope the query.
budget_configuration_idstringUnique identifier for the budget configuration.
display_namestringHuman-readable name of the budget.
alert_configuration_idstringUnique identifier for the alert configuration this action belongs to.
quantity_thresholdstringThreshold value that triggers the parent alert.
action_configuration_idstringUnique identifier for this action configuration (one row per action).
action_typestringType of action to perform when the alert fires (e.g. EMAIL_NOTIFICATION).
action_targetstringTarget for the action, such as an email address or webhook URL.

Required Parameters

The following parameters are required by this view:

NameDatatypeDescription
account_idstringDatabricks account ID used to scope the query.

SELECT Examples

SELECT
account_id,
budget_configuration_id,
display_name,
alert_configuration_id,
quantity_threshold,
action_configuration_id,
action_type,
action_target
FROM databricks_account.billing.vw_budget_alert_actions
WHERE account_id = '{{ account_id }}';

SQL Definition

SELECT
b.account_id,
b.budget_configuration_id,
b.display_name,
JSON_EXTRACT(ac.value, '$.alert_configuration_id') AS alert_configuration_id,
JSON_EXTRACT(ac.value, '$.quantity_threshold') AS quantity_threshold,
JSON_EXTRACT(act.value, '$.action_configuration_id') AS action_configuration_id,
JSON_EXTRACT(act.value, '$.action_type') AS action_type,
JSON_EXTRACT(act.value, '$.target') AS action_target
FROM databricks_account.billing.budgets b,
JSON_EACH(b.alert_configurations) ac,
JSON_EACH(JSON_EXTRACT(ac.value, '$.action_configurations')) act
WHERE account_id = '{{ account_id }}'