Schemas:

ACCOUNT_USAGE , READER_ACCOUNT_USAGE

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

TEXT

Type of service that is consuming credits, which can be one of the following:

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

Internal/system-generated identifier for the service type.

NAME

TEXT

Name of the service type. When the service type is SNOWPIPE_STREAMING, there are two cost entries. One entry is for the name of the Snowflake Table object and the other one is for the colon separated Snowpipe Streaming, CLIENT_NAME and SNOWFLAKE_PROVIDED_ID.

CREDITS_USED_COMPUTE

NUMBER

Number of credits used by warehouses and serverless compute resources in the hour.

CREDITS_USED_CLOUD_SERVICES

NUMBER

Number of credits used for cloud services in the hour.

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 auto_clustering, indicates the number of bytes reclustered during the START_TIME and END_TIME window. When the service type is pipe, indicates the number of bytes inserted during the START_TIME and END_TIME window. When the service type is SNOWPIPE_STREAMING, indicates the number of bytes migrated during the START_TIME and END_TIME window.

ROWS

NUMBER

When the service type is auto_clustering, indicates number of rows reclustered during the START_TIME and END_TIME window. When the service type is SNOWPIPE_STREAMING, indicates the number of rows migrated during the START_TIME and END_TIME window.

FILES

NUMBER

When the service type is pipe, indicates number of files loaded during the START_TIME and END_TIME window. When the service type is SNOWPIPE_STREAMING, this is null.

BUDGET_ID

TEXT

The internal identifier for the budget monitoring this credit usage. 0 if the credit usage is not monitored by a budget.

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_STREAMING may be up to 12 hours.