Context Functions (Alerts)
Returns the query ID for the SQL statement executed for the condition of an alert. In the action for an alert, you can call this function to check the results of the statement for the condition.
The query ID for the SQL statement for the condition of the alert.
This function is defined in the ALERT schema of the SNOWFLAKE database.
To call this function, you must use a role that is granted the SNOWFLAKE database role ALERT_VIEWER. For example, to call the function as a user with the role alert_role, execute:
GRANT DATABASE ROLE snowflake.alert_viewer TO ROLE alert_role;
This function can only be called from within an alert.