STAGE_STORAGE_USAGE_HISTORY
functionsupportedData loading & unloadingThis table function can be used to query the average daily data storage usage, in bytes, for all the Snowflake stages in your account within a specified date range. The output will include storage for: - Named internal stages. - Default staging areas (for tables and users). Note This function returns stage storage usage within the last 6 months. Note This function is generally deprecated in favor of the ACCOUNT_USAGE.STAGE_STORAGE_USAGE_HISTORY view, which provides a more complete data set and supports longer date ranges.
Syntax
supportedpartialnot supportednot scored
STAGE_STORAGE_USAGE_HISTORY(
[ DATE_RANGE_START => <constant_expr> ]
[, DATE_RANGE_END => <constant_expr> ] )
Parameters
| Name | Required | Description |
|---|---|---|
DATE_RANGE_START => constant_expr , DATE_RANGE_END => constant_expr | required | The date range, within the last 6 months, for which to retrieve stage storage usage: 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 DATE_RANGE_END is used as the start of the range (i.e. the default is one day of storage usage). If the range falls outside the last 6 months, an error is returned. |
Usage notes
- Returns results only for the ACCOUNTADMIN role or any role that has been explicitly granted the MONITOR USAGE global privilege.
- When calling an Information Schema table function, the session must have an INFORMATION_SCHEMA schema in use or the function name must be fully-qualified. For more details, see Snowflake Information Schema.
Output
The function returns the following columns: Column Name | Data Type | Description USAGE_DATE | DATE | Date (in the UTC time zone) of this storage usage record AVERAGE_STAGE_BYTES | NUMBER | Number of bytes of stage storage used