METERING_DAILY_HISTORY 视图¶
ACCOUNT_USAGE 架构中的 METERING_DAILY_HISTORY 视图可用于返回账户在过去 365 天(1 年)内的每日 credit 使用量和云服务返利。
备注
As of March 1, 2026, Snowflake no longer bills customers for hybrid table requests, and metering was disabled soon after this pricing change took effect. Any new data in the view as of March 1, 2026, will not be billed to customers, and you can still query the historical data in the view.
列¶
列名称 |
数据类型 |
描述 |
|---|---|---|
SERVICE_TYPE |
VARCHAR |
Type of service that is consuming credits. The following list includes many, but not all, of the possible service types:
|
USAGE_DATE |
DATE |
使用发生的日期。 |
CREDITS_USED_COMPUTE |
NUMBER |
当天为仓库、无服务器计算和 :doc:` Openflow </user-guide/data-integration/openflow/about>` 资源计费的 credit 数。 |
CREDITS_USED_CLOUD_SERVICES |
NUMBER |
当天为云服务计费的 credit 数。如果 SERVICE_TYPE 是 Openflow 类型之一,则始终为 |
CREDITS_USED |
NUMBER |
CREDITS_USED_COMPUTE 和 CREDITS_USED_CLOUD_SERVICES 之和。 |
CREDITS_ADJUSTMENT_CLOUD_SERVICES |
NUMBER |
根据云服务进行调整 后的 Credit 数量。此值为负值(如 |
CREDITS_BILLED |
NUMBER |
该账户当日计费的 Credit 总数。这是 CREDITS_USED_COMPUTE、CREDITS_USED_CLOUD_SERVICES 和 CREDITS_ADJUSTMENT_CLOUD_SERVICES 的总和。 |
使用说明¶
视图的延迟时间最长可达 180 分钟(3 小时)。
如果要将此视图中的数据与 ORGANIZATION USAGE 架构 中的相应视图进行协调,则必须先将会话的时区设置为 UTC。在查询 Account Usage 视图之前,执行以下操作:
示例¶
仅当 云服务的使用量 超过虚拟仓库每日使用量的 10% 时,才会收取使用费用。此查询返回特定日期实际计费的云服务使用量,按最高计费金额排序。