In Snowflake ACCOUNT_USAGE.METERING_HISTORY view will the ENTITY_ID field for WAREHOUSE_METERING entries always equal the WAREHOUSE_ID?

Viewed 56

The documentation describes ENTITY_ID as "Internal/system-generated identifier for the service type." From a cursory analysis it appears that this does map to WAREHOUSE_ID for single cluster warehouses. Is this also the case for multi-cluster warehouses? e.g. If a multi-cluster warehouse is running will there be two entries in the METERING_HISTORY view for that hour with ENTITY_ID = WAREHOUSE_ID or one entry that combines the values? If it is just one entry, what would the value of ENTITY_ID be? The first?

1 Answers

A warehouse is considered to be a single entity regardless of the number of clusters it contains, so it only has one ENTITY_ID which maps to WAREHOUSE_ID. There will not be a separate entry in METERING_HISTORY for each cluster in the warehouse.

Related