스키마:

ACCOUNT_USAGE , READER_ACCOUNT_USAGE

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

크레딧을 소비한 Snowflake 리소스 유형(예: WAREHOUSE, TASK 또는 TABLE)입니다. 참고: 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:

  • Cost entry 1 (table name): The value is the name of the Snowflake target table. For the high-performance default pipe, the name is derived from the target table name and appended with -STREAMING; for example, MY_TABLE-STREAMING.

  • Cost entry 2 (client string): The value is a colon-separated string in the format: SNOWPIPE_STREAMING:CLIENT_NAME:SNOWFLAKE_PROVIDED_ID. This is used for tracking client-side costs.

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 ENTITY_TYPE. Contains a NULL value when the resource isn’t associated with a specific database; for example, a warehouse or compute pool.

DATABASE_NAME

VARCHAR

ENTITY_TYPE 유형의 리소스와 연관된 데이터베이스의 이름입니다. 리소스가 특정 데이터베이스와 연관되지 않은 경우 NULL 값을 포함합니다.

SCHEMA_ID

NUMBER

Internal or system-generated identifier of the schema associated with the resource of type ENTITY_TYPE. Contains a NULL value when the resource isn’t associated with a specific schema.

SCHEMA_NAME

VARCHAR

ENTITY_TYPE 유형의 리소스와 연관된 스키마의 이름입니다. 리소스가 특정 스키마와 연관되지 않은 경우 NULL 값을 포함합니다.

CREDITS_USED_COMPUTE

NUMBER

해당 시간에 웨어하우스, 서버리스 컴퓨팅 및 Openflow 리소스에서 사용하는 크레딧의 수입니다.

CREDITS_USED_CLOUD_SERVICES

NUMBER

클라우드 서비스에 사용된 시간당 크레딧 수입니다. SERVICE_TYPE 이 Openflow 유형 중 하나인 경우 항상 0 입니다.

CREDITS_USED

NUMBER

계정에 사용된 시간당 총 크레딧 수입니다. 이는 CREDITS_USED_COMPUTE 및 CREDITS_USED_CLOUD_SERVICES 의 합계입니다. 이 값은 클라우드 서비스 조정을 고려하지 않으므로 실제 크레딧 소비보다 클 수 있습니다.

BYTES

NUMBER

서비스 유형이 auto_clustering 인 경우, START_TIME 및 END_TIME 기간 동안 다시 클러스터된 바이트 수를 나타냅니다. 서비스 유형이 pipe 인 경우 START_TIME 및 END_TIME 기간 동안 삽입된 바이트 수를 나타냅니다. 서비스 유형이 SNOWPIPE_STREAMING 인 경우 START_TIME 및 END_TIME 기간 동안 마이그레이션된 바이트 수를 나타냅니다. 서비스 유형이 COPY_FILES 인 경우 열은 데이터베이스 수준에서 집계됩니다.

ROWS

NUMBER

서비스 유형이 auto_clustering 인 경우, START_TIME 및 END_TIME 기간 동안 재클러스터된 행 수를 나타냅니다. 서비스 유형이 SNOWPIPE_STREAMING 인 경우 START_TIME 및 END_TIME 기간 동안 마이그레이션된 행 수를 나타냅니다.

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. When the service type is COPY_FILES, columns are aggregated at the database level.

사용법 노트

  • CREDITS_USED_CLOUD_SERVICES 열을 제외하고 뷰의 지연 시간은 최대 180분(3시간)입니다. CREDITS_USED_CLOUD_SERVICES의 지연 시간은 최대 6시간입니다.

  • SNOWPIPE_STREAMING 의 크레딧 소비를 표시하기 위한 지연 시간은 최대 12시간일 수 있습니다.