- Schema:
WAREHOUSE_EVENTS_HISTORY View¶
This Account Usage view can be used to return the events that have been triggered for the single-cluster and multi-cluster warehouses in your account in the last 365 days (1 year).
Supported events include:
Creating, dropping, or altering a warehouse, including resizing the warehouse.
Resuming or suspending a warehouse.
Resuming, suspending, or resizing a cluster in a warehouse (single-cluster and multi-cluster warehouses).
Stopping or starting additional clusters in a warehouse (multi-cluster warehouses only).
Columns¶
Column Name |
Data Type |
Description |
---|---|---|
TIMESTAMP |
TIMESTAMP_LTZ |
The timestamp when the event is triggered. |
WAREHOUSE_ID |
NUMBER |
The unique warehouse ID (assigned by Snowflake) that corresponds to the warehouse name in your account. |
WAREHOUSE_NAME |
TEXT |
The name of the warehouse in your account. |
CLUSTER_NUMBER |
NUMBER |
If an event was triggered for a specific cluster in a multi-cluster warehouse, the number of the cluster (starting with 1) for which the event was triggered; if the event was triggered for all clusters in the warehouse or is not applicable for a single-cluster warehouse, NULL is displayed. |
EVENT_NAME |
TEXT |
Name of the event. For the list of possible values, see EVENT_NAME Descriptions (in this topic). |
EVENT_REASON |
TEXT |
The cause of the event. For the list of possible values, see EVENT_REASON Descriptions (in this topic). |
EVENT_STATE |
TEXT |
State of an event that takes time to complete or can be canceled: STARTED, COMPLETED, PARTIALLY_COMPLETED. |
USER_NAME [1] |
TEXT |
User who initiated the event. |
ROLE_NAME [1] |
TEXT |
Role that was active in the session at the time the event was initiated. |
QUERY_ID [1] |
TEXT |
Internal/system-generated identifier for the SQL statement. |
[1] These fields display data only for queries executed from April 1, 2021 onwards.
Usage Notes¶
Latency for the view may be up to 3 hours.
Each event can produce multiple rows in the view for the following reasons:
Events often trigger additional, related events.
Events may take time to complete or may be canceled; if this occurs, the EVENT_STATE column indicates whether the event was started, completed, or canceled.
EVENT_REASON Descriptions¶
- WAREHOUSE_AUTORESUME
A suspended warehouse was resumed automatically because AUTO_RESUME is enabled for the warehouse and a SQL statement was submitted to the warehouse.
- WAREHOUSE_RESUME
A suspended warehouse was resumed manually by a user.
- WAREHOUSE_AUTOSUSPEND
A running warehouse was suspended automatically because AUTO_SUSPEND is enabled for the warehouse and the defined period of inactivity for AUTO_SUSPEND has passed.
- WAREHOUSE_SUSPEND
A running warehouse was suspended manually by a user.
- WAREHOUSE_RESIZE
A warehouse was resized.
- RESOURCE_MONITOR_SUSPEND
A warehouse was suspended because the credit quota for the resource monitor for the warehouse was reached.
- MULTICLUSTER_SPINUP
A new/suspended cluster was provisioned in a multi-cluster warehouse; not applicable to single-cluster warehouses.
- MULTICLUSTER_SPINDOWN
A running cluster was shut down in a multi-cluster warehouse; not applicable to single-cluster warehouses.
EVENT_NAME Descriptions¶
Warehouse-related Events:
- CREATE_WAREHOUSE
Triggered by the creation of a new warehouse, which can occur when a user manually creates a warehouse or when an account is provisioned and the default warehouse is automatically created in the account.
Cluster number: None (N/A)
Event state: COMPLETED
Event reason: None (N/A)
Billing impact: No billing activity for this event if the cluster is created with INITIALLY_SUSPENDED = TRUE; otherwise, metering starts when all compute resources are provisioned for the warehouse or the warehouse starts processing statements (if the warehouse starts processing statements before the resources are fully provisioned).
- DROP_WAREHOUSE
Triggered when an existing warehouse is dropped; all running statements on the warehouse are stopped and the compute resources are released.
Cluster number: None (N/A)
Event state: COMPLETED
Event reason: None (N/A)
Billing impact: All metering activity is stopped.
- ALTER_WAREHOUSE
Triggered when the properties of an existing warehouse are changed, including resizing the warehouse. If the warehouse is resized, additional RESIZE_WAREHOUSE events are triggered. This event can also trigger RESUME_WAREHOUSE or SUSPEND_WAREHOUSE events.
Cluster number: None (N/A)
Event state: COMPLETED
Event reason: None (N/A)
Billing impact: The billing impact depends on the event(s) that were triggered.
- RESIZE_WAREHOUSE
Triggered by changing the size of a warehouse, which increases or decreases the compute resources in each cluster in the warehouse. For a running warehouse, this event also triggers a RESIZE_CLUSTER event for each cluster in the warehouse.
Cluster number: None (applies to all clusters)
Event state: STARTED, COMPLETED, or PARTIALLY_COMPLETED
Event reason: WAREHOUSE_RESIZE
Billing impact: Resizing a running warehouse adds or removes compute resources in each cluster in the warehouse; the new added resources start metering when they are provisioned, while the removed resources stop metering after they finished processing any running statements. Resizing a suspended warehouse does not provision any new resources for the warehouse.
- RESUME_WAREHOUSE
Triggered when a suspended warehouse is resumed or a new warehouse is created with INITIALLY_SUSPENDED = FALSE. This event also triggers a RESUME_CLUSTER event for each cluster in the warehouse.
Cluster number: None (applies to all clusters)
Event state: STARTED, COMPLETED, or PARTIALLY_COMPLETED
Event reason: WAREHOUSE_AUTORESUME or WAREHOUSE_RESUME
Billing impact: The metering begins once all the compute resources are provisioned for the warehouse.
- SUSPEND_WAREHOUSE
Triggered when a running warehouse is suspended. This event also triggers a SUSPEND_CLUSTER event for each cluster in the warehouse.
Cluster number: None (applies to all clusters)
Event state: STARTED, COMPLETED, or PARTIALLY_COMPLETED
Event reason: WAREHOUSE_AUTOSUSPEND or WAREHOUSE_SUSPEND
Billing impact: Metering on the compute resources for the warehouse stops after all running statements complete.
Cluster-related Events:
- RESUME_CLUSTER
Triggered when a suspended cluster is resumed.
Cluster number: Number of the resumed cluster (always
1
for a single-cluster warehouse)Event state: COMPLETED
Event reason:
WAREHOUSE_AUTORESUME or WAREHOUSE_RESUME (single-cluster warehouses)
MULTICLUSTER_SPINUP (multi-cluster warehouses)
Billing impact: Metering starts on the compute resources for the cluster once they are provisioned.
- SUSPEND_CLUSTER
Triggered when a running cluster is suspended.
Cluster number: Number of the suspended cluster (always
1
for a single-cluster warehouse)Event state: COMPLETED
Event reason:
WAREHOUSE_AUTOSUSPEND or WAREHOUSE_SUSPEND (single-cluster warehouses)
MULTICLUSTER_SPINDOWN (multi-cluster warehouses)
RESOURCE_MONITOR_SUSPEND (all warehouses)
Billing impact: Metering stops on the compute resources for the cluster after all running statements finish.
- RESIZE_CLUSTER
Triggered when a cluster is resized, usually as a result of resizing a warehouse.
Cluster number: Number of the resized cluster (always
1
for a single-cluster warehouse)Event state: COMPLETED
Event reason:
WAREHOUSE_AUTORESUME or WAREHOUSE_RESUME (single-cluster warehouses)
MULTICLUSTER_SPINDOWN or MULTICLUSTER_SPINUP (multiple-cluster warehouses)
WAREHOUSE_RESIZE (all warehouses)
Billing impact: Depends on whether compute resources are added or removed due to the resizing:
Compute resources that are added start metering after they are provisioned.
Compute resources that are removed stop metering after all running statements finish.
- SPINUP_CLUSTER
Triggered when a cluster is started (multi-cluster warehouse only); usually happens when the mininimum/maximum cluster size is increased.
Cluster number: Number of the cluster that was started
Event state: STARTED, COMPLETED, or PARTIALLY_COMPLETED
Event reason: MULTICLUSTER_SPINUP or WAREHOUSE_RESIZE
Billing impact: Metering start on the compute resources for the cluster once they are provisioned.
- SPINDOWN_CLUSTER
Triggered when a running cluster is shut down (multi-cluster warehouse only); usually happens when the mininimum/maximum cluster size is decreased.
Cluster number: Number of the cluster that was shut down
Event state: STARTED, COMPLETED, or PARTIALLY_COMPLETED
Event reason: MULTICLUSTER_SPINDOWN or WAREHOUSE_RESIZE
Billing impact: Metering stops on the compute resources for the cluster after all running statements finish.