SERVERLESS_ALERT_HISTORY

functionsupportedUDFs, procedures, tasks, alerts, scripting

docs.snowflake.com ↗

Information SchemaTable functions

This table function is used for querying the serverless alert usage history. The information returned by the function includes the alert name and credits consumed by the execution of each alert. Note This function is generally deprecated in favor of the ACCOUNT_USAGE.SERVERLESS_ALERT_HISTORY view, which provides a more complete data set and supports longer date ranges.

Syntax

supportedpartialnot supportednot scored

SERVERLESS_ALERT_HISTORY(
  [ DATE_RANGE_START => <constant_expr> ]
  [ , DATE_RANGE_END => <constant_expr> ]
  [ , ALERT_NAME => '<string>' ] )

Parameters

NameRequiredDescription
DATE_RANGE_START => constant_expr , DATE_RANGE_END => constant_exprrequiredDate/time range of the usage window: If an end date is not specified, then CURRENT_DATE is used as the end of the range. If a start date is not specified, then the range starts 10 minutes prior to the start of DATE_RANGE_END (that is, the default is to show the previous 10 minutes of the usage history). For example, if DATE_RANGE_END is CURRENT_DATE, then the default DATE_RANGE_START is 11:50 PM on the previous day.
ALERT_NAME => stringrequiredThe name of the alert for which to retrieve usage history. Only the usage data for the specified alert is returned. Note that the alert name must be enclosed in single quotes. Also, if the alert name contains any spaces, mixed-case characters, or special characters, the name must be double-quoted within the single quotes (e.g. '"My Alert"' vs 'myalert').

Usage notes

Output

The function returns the following columns: Column Name | Data Type | Description START_TIME | TIMESTAMP_LTZ | Start of the specified time range. END_TIME | TIMESTAMP_LTZ | End of the specified time range. ALERT_NAME | TEXT | Name of the alert. CREDITS_USED | TEXT | Number of credits billed for serverless alert usage during the START_TIME and END_TIME window.

See also