METERING_HISTORY ビュー¶
ACCOUNT_USAGE スキーマの METERING_HISTORY ビューを使用して、過去365日間(1年間)におけるアカウントの時間単位のクレジット使用状況を返すことができます。
列¶
列名 |
データ型 |
説明 |
|---|---|---|
SERVICE_TYPE |
VARCHAR |
クレジットを消費しているサービスのタイプ。以下のリストには、可能なサービスタイプのすべてではなく、その多くが含まれています。
|
START_TIME |
TIMESTAMP_LTZ |
使用のあった日付と開始時間(ローカルタイムゾーン)。 |
END_TIME |
TIMESTAMP_LTZ |
使用のあった日付と終了時間(ローカルタイムゾーン)。 |
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 |
WAREHOUSE、TASK、TABLE など、クレジットを消費したSnowflakeリソースの型。TABLE はすべてのテーブルのようなオブジェクトに使用されることに注意してください。 |
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 |
型が |
SCHEMA_ID |
NUMBER |
Internal or system-generated identifier of the schema associated with the resource of type |
SCHEMA_NAME |
VARCHAR |
型が |
CREDITS_USED_COMPUTE |
NUMBER |
ウェアハウス、サーバーレスコンピュート、 Openflow リソースが1時間に使用したクレジット数。 |
CREDITS_USED_CLOUD_SERVICES |
NUMBER |
時間内にクラウドサービスのために使用されたクレジットの数。SERVICE_TYPE がOpenflowタイプの場合は、常に |
CREDITS_USED |
NUMBER |
時間内にアカウントに使用されたクレジットの総数。これは CREDITS_USED_COMPUTE と CREDITS_USED_CLOUD_SERVICES の合計です。この値はクラウドサービスの調整を考慮していないため、実際のクレジット消費量よりも大きくなる場合があります。 |
BYTES |
NUMBER |
サービスタイプが |
ROWS |
NUMBER |
サービスタイプが |
FILES |
NUMBER |
When the service type is |
使用上の注意¶
ビューの待機時間は、 CREDITS_USED_CLOUD_SERVICES 列を除き、最大180分(3時間)です。CREDITS_USED_CLOUD_SERVICES の待機時間は最大6時間です。
SNOWPIPE_STREAMINGのクレジット消費の表示には最大12時間かかる場合があります。