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

Internal/system-generated identifier for the entity type. When the service type is COPY_FILES, this column shows the ID of the database, schema, or stage from which files are copied. NULL when the SERVICE_TYPE is one of the Openflow types.

ENTITY_TYPE

VARCHAR

Type of Snowflake resource that consumed credits, such as WAREHOUSE, TASK, or TABLE. Note that TABLE is used for all table-like objects.

NAME

VARCHAR

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. When the service type is COPY_FILES, this column shows the name of the database from which files are copied. When the service type is one of the Openflow types, the column shows 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

Name 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.

SCHEMA_ID

NUMBER

Internal/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

Name 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.

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

Quando o tipo de serviço é pipe, indica o número de arquivos carregados durante o intervalo START_TIME e END_TIME. Quando o tipo de serviço for SNOWPIPE_STREAMING, isso é nulo. Quando o tipo de serviço é COPY_FILES, as colunas são agregadas no nível do banco de dados.

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.