ALERT
Config path: /<database>/<schema>/alert/<name>.yaml
Example:
Schema
warehouse (ident) - warehouse used to executed alert
schedule (str) - schedule for periodically evaluating the condition for the alert
condition (str) - SQL statement that represents the condition for the alert
action (str) - SQL statement that should be executed if the condition returns one or more rows
comment (str)
Usage notes
SnowDDL only creates alerts. Alerts are initially suspended. You should execute
ALTER ALERT ... RESUME
via different means to enable alert execution.Schema objects should be referred using fully-qualified identifiers, with
${{ env_prefix }}
placeholder, database name, schema name and object name. It is currently required due to limitations ofALTER ALERT
command missing scope during validation of SQL statements.Alerts can only be created via SnowDDL config. Users with
OWNER
privilege on specific schemas cannot create custom alerts in such schemas.Alerts are executed with full privileges of SnowDDL Administrator User role.
Additional privileges
In order for ALERT
objects to operate properly, the following additional grants should be added to OWNER role in schema config:
owner_warehouse_usage
- list warehouses used to execute alertsowner_integration_usage
- if you send alert notifications, add name of notification integration hereowner_account_grants
- Snowflake requiresEXECUTE ALERT
privilege to run alerts
Links
Last updated