- Schema:
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 name | Data type | Description |
|---|---|---|
| USAGE_DATE | DATE | Date (in the local time zone) for the storage usage record. We recommend
changing your session to use the UTC time zone by using |
| CATALOG_NAME | VARCHAR | Database that the stage belongs to. NULL for user stages. |
| CATALOG_ID | NUMBER | Internal, system-generated identifier for the database that the stage belongs to (NULL for user stages). |
| SCHEMA_NAME | VARCHAR | Schema that the stage belongs to (NULL for user stages). |
| SCHEMA_ID | NUMBER | Internal, system-generated identifier for the schema that the stage belongs to (NULL for user stages). |
| ENTITY_NAME | VARCHAR | 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_TYPE | VARCHAR | The type of internal stage: User, Internal Named, or Table. |
| ENTITY_ID | NUMBER | 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. |
| BYTES | NUMBER | Bytes used by the stage. |
| FILE_COUNT | NUMBER | Number of files on the stage. |
| STAGE_CREATED | TIMESTAMP_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_DROPPED | TIMESTAMP_LTZ | Date and time at which the stage was dropped. NULL if the stage has not been dropped. |
| CATALOG_CREATED | TIMESTAMP_LTZ | Date and time at which the database containing the stage was created. NULL for user stages. |
| CATALOG_DROPPED | TIMESTAMP_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_CREATED | TIMESTAMP_LTZ | Date and time at which the schema containing the stage was created. NULL for user stages. |
| SCHEMA_DROPPED | TIMESTAMP_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. |
| COMMENT | VARCHAR | Comment for the stage. Only available for internal named stages, otherwise NULL. |
| MAX_LAST_MODIFIED | TIMESTAMP_LTZ | Most recent file modification timestamp among all files in the stage for the given usage date. |
| MIN_LAST_MODIFIED | TIMESTAMP_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.