Alert
laktory.models.resources.databricks.Alert
¤
Bases: BaseModel
, PulumiResource
, TerraformResource
Databricks SQL Query
ATTRIBUTE | DESCRIPTION |
---|---|
access_controls |
SQL Alert access controls
TYPE:
|
condition |
Trigger conditions of the alert.
TYPE:
|
dirpath |
Workspace directory inside rootpath in which the alert is deployed.
Used only if
TYPE:
|
display_name |
Name of the alert.
TYPE:
|
query_id |
ID of the query evaluated by the alert. Mutually exclusive with
TYPE:
|
custom_body |
Custom body of alert notification, if it exists. See Alerts API reference for custom templating instructions.
TYPE:
|
custom_subject |
Custom subject of alert notification, if it exists. This includes email subject, Slack notification header, etc. See Alerts API reference for custom templating instructions.
TYPE:
|
name_prefix |
Prefix added to the alert display name
TYPE:
|
name_suffix |
Suffix added to the alert display name
TYPE:
|
notify_on_ok |
Whether to notify alert subscribers when alert returns back to normal.
TYPE:
|
owner_user_name |
Alert owner's username.
TYPE:
|
parent_path |
The path to a workspace folder containing the alert. Set to
TYPE:
|
rootpath |
Root directory to which all alerts are deployed to. Can also be
configured by settings LAKTORY_WORKSPACE_LAKTORY_ROOT environment
variable. Default is
TYPE:
|
seconds_to_retrigger |
Number of seconds an alert must wait after being triggered to rearm itself. After rearming, it can be triggered again. If 0 or not specified, the alert will not be triggered again.
TYPE:
|
Examples:
from laktory import models
alert = models.resources.databricks.Alert(
display_name="My Alert",
parent_path="/alerts",
query_id="1",
condition={
"op": "GREATER_THAN",
"operand": {"column": {"name": "value"}},
"threshold": {"value": {"double_value": 42.0}},
},
)
ATTRIBUTE | DESCRIPTION |
---|---|
additional_core_resources |
TYPE:
|
--
laktory.models.resources.databricks.alert.AlertCondition
¤
Bases: BaseModel
Alert Conditions
ATTRIBUTE | DESCRIPTION |
---|---|
op |
Operator used to compare in alert evaluation. (Enum:
TYPE:
|
operand |
Name of the column from the query result to use for comparison in alert evaluation.
TYPE:
|
empty_result_state |
Alert state if the result is empty (
TYPE:
|
threshold |
Threshold value used for comparison in alert evaluation:
TYPE:
|
--
laktory.models.resources.databricks.alert.AlertConditionOperand
¤
Bases: BaseModel
ATTRIBUTE | DESCRIPTION |
---|---|
column |
Block describing the column from the query result to use for comparison in alert evaluation |
--
laktory.models.resources.databricks.alert.AlertConditionThreshold
¤
Bases: BaseModel
ATTRIBUTE | DESCRIPTION |
---|---|
value |
Actual value used in comparison (one of the attributes is required) |
--
laktory.models.resources.databricks.alert.AlertConditionOperandColumn
¤
--