- Schemas:
METERING_HISTORY view¶
The METERING_HISTORY view in the ACCOUNT_USAGE schema can be used to return the hourly credit usage for an account within the last 365 days (1 year).
Columns¶
Column Name |
Data Type |
Description |
|---|---|---|
SERVICE_TYPE |
VARCHAR |
Type of service that is consuming credits. The following list includes many, but not all, of the possible service types:
|
START_TIME |
TIMESTAMP_LTZ |
The date and beginning of the hour (in the local time zone) in which the usage took place. |
END_TIME |
TIMESTAMP_LTZ |
The date and end of the hour (in the local time zone) in which the usage took place. |
ENTITY_ID |
NUMBER |
A system-generated identifier for the entity associated with the service. In most cases, this is the internal ID of the monitored entity; for example, a pipe, task, or replication group. When the SERVICE_TYPE is COPY_FILES, this column shows the ID of the database, schema, or stage from which files are copied. If the SERVICE_TYPE is an Openflow type, the value is NULL. If the SERVICE_TYPE is Snowpipe Streaming, this shows the ID of the relevant pipe; which is the default pipe ID for the default pipe. |
ENTITY_TYPE |
VARCHAR |
Type of Snowflake resource that consumed credits, such as WAREHOUSE, TASK, or TABLE. Note that TABLE is used for all table-like objects. |
NAME |
VARCHAR |
The name of the service or object associated with the cost entry, which varies significantly based on the SERVICE_TYPE. Standard (General): This column shows the name of the service type itself; for example, REPLICATION, TASK. SNOWPIPE_STREAMING: This service type generates two distinct cost entries, and the NAME column varies for each:
COPY_FILES: The value is the name of the database from which the files are copied. Openflow Types: The value is NULL. |
DATABASE_ID |
NUMBER |
Internal/system-generated identifier of the database associated with the resource of type |
DATABASE_NAME |
VARCHAR |
Name of the database associated with the resource of type |
SCHEMA_ID |
NUMBER |
Internal or system-generated identifier of the schema associated with the resource of type |
SCHEMA_NAME |
VARCHAR |
Name of the schema associated with the resource of type |
CREDITS_USED_COMPUTE |
NUMBER |
Number of credits used by warehouses, serverless compute, and Openflow resources in the hour. |
CREDITS_USED_CLOUD_SERVICES |
NUMBER |
Number of credits used for cloud services in the hour. Always |
CREDITS_USED |
NUMBER |
Total number of credits used for the account in the hour. This is a sum of CREDITS_USED_COMPUTE and CREDITS_USED_CLOUD_SERVICES. This value does not take into account the adjustment for cloud services, and may therefore be greater than your actual credit consumption. |
BYTES |
NUMBER |
When the service type is |
ROWS |
NUMBER |
When the service type is |
FILES |
NUMBER |
When the service type is |
Usage notes¶
Latency for the view may be up to 180 minutes (3 hours), except for the CREDITS_USED_CLOUD_SERVICES column. Latency for CREDITS_USED_CLOUD_SERVICES may be up to 6 hours.
Latency for showing the credit consumption of
SNOWPIPE_STREAMINGmay be up to 12 hours.