Esquemas:

ACCOUNT_USAGE , READER_ACCOUNT_USAGE

Exibição METERING_HISTORY

A exibição METERING_HISTORY no esquema ACCOUNT_USAGE pode ser usada para retornar a uso de crédito a cada hora para uma conta nos últimos 365 dias (1 ano).

Colunas

Nome da coluna

Tipo de dados

Descrição

SERVICE_TYPE

VARCHAR

Tipo de serviço que está consumindo créditos. A lista a seguir inclui muitos, mas não todos, os tipos de serviços possíveis:

START_TIME

TIMESTAMP_LTZ

A data e início da hora (no fuso horário local) em que ocorreu o uso.

END_TIME

TIMESTAMP_LTZ

A data e o fim da hora (no fuso horário local) em que ocorreu o uso.

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

Tipo de recurso do Snowflake que consumiu créditos, como WAREHOUSE, TASK ou TABLE. Observe que TABLE é utilizado para todos os objetos do tipo tabela.

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

Nome do banco de dados associado ao recurso do tipo ENTITY_TYPE. Contém um valor NULL quando o recurso não está associado a um banco de dados específico.

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

Nome do esquema associado ao recurso do tipo ENTITY_TYPE. Contém um valor NULL quando o recurso não está associado a um esquema específico.

CREDITS_USED_COMPUTE

NUMBER

Número de créditos usados por warehouses, computação sem servidor e recursos do Openflow na hora.

CREDITS_USED_CLOUD_SERVICES

NUMBER

Número de créditos usados para serviços de nuvem em uma hora. Sempre 0 quando o SERVICE_TYPE for um dos tipos de Openflow.

CREDITS_USED

NUMBER

Número total de créditos utilizados para a conta na hora. Esta é uma soma de CREDITS_USED_COMPUTE e CREDITS_USED_CLOUD_SERVICES. Este valor não leva em conta o ajuste para serviços de nuvem e, portanto, pode ser maior do que seu consumo real de crédito.

BYTES

NUMBER

Quando o tipo de serviço for auto_clustering, indica o número de bytes retidos durante o intervalo START_TIME e END_TIME. Quando o tipo de serviço for pipe, indica o número de bytes inseridos durante o intervalo START_TIME e END_TIME. Quando o tipo de serviço for SNOWPIPE_STREAMING, indica o número de bytes migrados durante o intervalo START_TIME e END_TIME. Quando o tipo de serviço é COPY_FILES, as colunas são agregadas no nível do banco de dados.

ROWS

NUMBER

Quando o tipo de serviço é auto_clustering, indica o número de linhas reclusas durante o intervalo START_TIME e END_TIME. Quando o tipo de serviço for SNOWPIPE_STREAMING, indica o número de linhas migradas durante o intervalo START_TIME e 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.

Notas de uso

  • A latência da exibição pode ser de até 180 minutos (3 horas), exceto para a coluna CREDITS_USED_CLOUD_SERVICES. A latência de CREDITS_USED_CLOUD_SERVICES pode ser de até 6 horas.

  • A latência para mostrar o consumo de crédito de SNOWPIPE_STREAMING pode ser de até 12 horas.