- Categories:
System functions (System Information)
SYSTEM$LIST_ ALERT_ TEMPLATES¶
Lists the alert templates that are available in your account, grouped by product.
Use this function to discover which templates exist before you inspect a specific template with SYSTEM$GET_ALERT_TEMPLATE and create an alert with CREATE ALERT … FROM TEMPLATE.
Syntax¶
Arguments¶
productAn optional product category used to filter the results, so that only the templates owned by that product are returned (for example,
TASKS,OPENFLOW,DATA_QUALITY). This is the same value reported in theproductfield of the returned payload. The value is not case-sensitive.If you omit this argument, the function returns the templates for all products.
Returns¶
Returns a JSON object that describes the available templates. The top-level fields are:
catalog_version. The version of the alert-template catalog that is active for your account.template_groups. An array of product groups. Each group has:product. The product category that owns the templates (for example,TASKS,OPENFLOW,DATA_QUALITY).templates. An array of the templates in that group.
Each object in templates has the following fields:
template_id. The identifier you pass to SYSTEM$GET_ALERT_TEMPLATE and to theFROM TEMPLATEclause of CREATE ALERT.template_version. The version of the template.display_name. A human-readable name for the template.alert_description. A description of what the template monitors.product. The product category that owns the template.supports_new_data_schedule. Whether the template can be used for an alert on new data (true) in addition to a scheduled alert.default_schedule. The schedule applied when you do not specify one (for example,30 MINUTES).scope. The monitoring scopes the template supports (for example,["Account", "Database", "Schema"]).subcategories. Optional product subcategories, ornull.runbook. An optional runbook reference for the template, ornull.
Usage notes¶
- This is a read-only function. It does not require a running warehouse.
- The set of available templates and their variables is managed by Snowflake and can change between catalog versions. Always use this function together with SYSTEM$GET_ALERT_TEMPLATE to get the current template identifiers and variable definitions rather than hard-coding them.
Examples¶
List all available alert templates:
List only the templates owned by a specific product:
The function returns a JSON object similar to the following (abbreviated):