Schema:

ACCOUNT_USAGE

STAGE_STORAGE_USAGE_DETAILS view

This Account Usage view displays information about storage usage for internal named stages, table stages, and user stages in your account.

Columns

Column nameData typeDescription
USAGE_DATEDATE

Date (in the local time zone) for the storage usage record. We recommend changing your session to use the UTC time zone by using ALTER SESSION SET TIMEZONE='UTC'.

CATALOG_NAMEVARCHARDatabase that the stage belongs to. NULL for user stages.
CATALOG_IDNUMBER

Internal, system-generated identifier for the database that the stage belongs to (NULL for user stages).

SCHEMA_NAMEVARCHARSchema that the stage belongs to (NULL for user stages).
SCHEMA_IDNUMBER

Internal, system-generated identifier for the schema that the stage belongs to (NULL for user stages).

ENTITY_NAMEVARCHAR

Name of the entity, depending on the stage type. For user stages, displays the name of the user that the stage belongs to. For table stages, displays the name of the table that the stage belongs to. For internal named stages, displays the name of the stage.

STAGE_TYPEVARCHARThe type of internal stage: User, Internal Named, or Table.
ENTITY_IDNUMBER

Unique identifier for the entity. For user stages, displays the ID of the user that the stage belongs to. For table stages, displays the ID of the table that the stage belongs to. For internal named stages, displays the ID of the stage. The combination of ENTITY_ID, STAGE_TYPE, and USAGE_DATE forms a composite key.

BYTESNUMBERBytes used by the stage.
FILE_COUNTNUMBERNumber of files on the stage.
STAGE_CREATEDTIMESTAMP_LTZ

Date and time at which the stage was created. For user stages, this is the time when the user was created. For table stages, this is the time when the table was created.

STAGE_DROPPEDTIMESTAMP_LTZ

Date and time at which the stage was dropped. NULL if the stage has not been dropped.

CATALOG_CREATEDTIMESTAMP_LTZ

Date and time at which the database containing the stage was created. NULL for user stages.

CATALOG_DROPPEDTIMESTAMP_LTZ

Date and time at which the database containing the stage was dropped. NULL for user stages or if the database has not been dropped.

SCHEMA_CREATEDTIMESTAMP_LTZ

Date and time at which the schema containing the stage was created. NULL for user stages.

SCHEMA_DROPPEDTIMESTAMP_LTZ

Date and time at which the schema containing the stage was dropped. NULL for user stages or if the schema has not been dropped.

COMMENTVARCHAR

Comment for the stage. Only available for internal named stages, otherwise NULL.

MAX_LAST_MODIFIEDTIMESTAMP_LTZ

Most recent file modification timestamp among all files in the stage for the given usage date.

MIN_LAST_MODIFIEDTIMESTAMP_LTZ

Oldest file modification timestamp among all files in the stage for the given usage date.

Usage notes

  • Latency for the view is up to 2 days.
  • This view is available for accounts hosted on AWS and Azure. It is not supported on GCP.
  • The view contains historical data for the last 90 days. Data accumulation began on the date this feature became generally available.
  • For AWS, the view displays information about named, table, and user stages. For Azure, the view only displays information for named stages.
  • Snowflake makes a best effort to provide information for all days. However, there might be days for which stage usage details aren’t available.
  • When you filter by a single USAGE_DATE value, queries might take several minutes on large warehouses. If you need to query this view regularly or want to keep more than 90 days of history, consider using a daily task to materialize one usage day into a separate table. For more information, see Introduction to tasks.
  • The combination of ENTITY_ID, STAGE_TYPE, and USAGE_DATE forms a composite key that uniquely identifies each row.