- Categories:
System functions (System Information)
SYSTEM$GET_ALERT_CONFIG¶
Returns information from an alert configuration.
For information about storing configuration values on an alert, see CREATE ALERT … CONFIG.
Syntax¶
Arguments¶
configuration_pathOptional path of the configuration value to return.
Uses the same syntax as Snowflake queries for semi-structured data. See GET_PATH for more information.
If omitted, the function returns the entire configuration as a JSON string.
Returns¶
The value at the specified path in the configuration, or the full JSON string if no path is specified.
Returns NULL if no configuration is set on the alert.
Usage notes¶
This function can only be called during alert execution (in the condition or action SQL of the alert). Calling it outside of alert runtime produces an error.
Use defensive casting functions such as TRY_TO_NUMBER and TRY_TO_BOOLEAN when converting configuration values to specific types. Use COALESCE to provide default values when the configuration might be
NULL.
Examples¶
The following example creates an alert with a configuration and uses SYSTEM$GET_ALERT_CONFIG to read values in both the condition and the action: