snowflake.core.warehouse.Warehouse

class snowflake.core.warehouse.Warehouse(name: str, warehouse_type: str | None = None, warehouse_size: str | None = None, wait_for_completion: str | None = None, max_cluster_count: int | None = None, min_cluster_count: int | None = None, scaling_policy: str | None = None, auto_suspend: int | None = None, auto_resume: str | None = None, initially_suspended: str | None = None, resource_monitor: str | None = None, comment: str | None = None, enable_query_acceleration: str | None = None, query_acceleration_max_scale_factor: int | None = None, max_concurrency_level: int | None = None, statement_queued_timeout_in_seconds: int | None = None, statement_timeout_in_seconds: int | None = None, type: str | None = None, size: str | None = None, state: str | None = None, started_clusters: int | None = None, running: int | None = None, queued: int | None = None, is_default: bool | None = None, is_current: bool | None = None, available: str | None = None, provisioning: str | None = None, quiescing: str | None = None, other: str | None = None, created_on: datetime | None = None, resumed_on: datetime | None = None, updated_on: datetime | None = None, owner: str | None = None, budget: str | None = None, kind: str | None = None, owner_role_type: str | None = None)

Bases: object

A model object representing the Warehouse resource.

Constructs an object of type Warehouse with the provided properties.

Parameters:
  • name (str) – A Snowflake object identifier.

  • warehouse_type (str, optional) – Type of warehouse, possible types: STANDARD, SNOWPARK-OPTIMIZED

  • warehouse_size (str, optional) – Size of warehouse, possible sizes: XSMALL, SMALL, MEDIUM, LARGE, XLARGE, XXLARGE, XXXLARGE, X4LARGE, X5LARGE, X6LARGE

  • wait_for_completion (str, optional) – When resizing a warehouse, you can use this parameter to block the return of the ALTER WAREHOUSE command until the resize has finished provisioning all its compute resources

  • max_cluster_count (int, optional) – Specifies the maximum number of clusters for a multi-cluster warehouse

  • min_cluster_count (int, optional) – Specifies the minimum number of clusters for a multi-cluster warehouse

  • scaling_policy (str, optional) – Scaling policy of warehouse, possible scaling policies: STANDARD, ECONOMY

  • auto_suspend (int, optional) – time in seconds before auto suspend

  • auto_resume (str, optional) – Specifies whether to automatically resume a warehouse when a SQL statement is submitted to it

  • initially_suspended (str, optional) – Specifies whether the warehouse is created initially in the Suspended state

  • resource_monitor (str, optional) – A Snowflake object identifier.

  • comment (str, optional) – Specifies a comment for the warehouse

  • enable_query_acceleration (str, optional) – Specifies whether to enable the query acceleration service for queries that rely on this warehouse for compute resources

  • query_acceleration_max_scale_factor (int, optional) – Specifies the maximum scale factor for leasing compute resources for query acceleration. The scale factor is used as a multiplier based on warehouse size

  • max_concurrency_level (int, optional) – Object parameter that specifies the concurrency level for SQL statements executed by a warehouse cluster

  • statement_queued_timeout_in_seconds (int, optional) – Object parameter that specifies the time, in seconds, a SQL statement can be queued on a warehouse before it is canceled by the system

  • statement_timeout_in_seconds (int, optional) – Object parameter that specifies the time, in seconds, after which a running SQL statement is canceled by the system

  • type (str, optional) – [Deprecated] Type of warehouse, possible types: STANDARD, SNOWPARK-OPTIMIZED

  • size (str, optional) – [Deprecated] names of size: X-Small, Small, Medium, Large, X-Large, 2X-Large, 3X-Large, 4X-Large, 5X-Large, 6X-Large

  • state (str, optional) – The state of warehouse, possible states: STARTED, STARTING, DYNAMIC, SUSPENDED, RESIZING, RESUMING, SUSPENDING

  • started_clusters (int, optional) – Number of clusters currently started.

  • running (int, optional) – Number of SQL statements that are being executed by the warehouse.

  • queued (int, optional) – Number of SQL statements that are queued for the warehouse.

  • is_default (bool, optional) – Whether the warehouse is the default for the current user.

  • is_current (bool, optional) – Whether the warehouse is in use for the session. Only one warehouse can be in use at a time for a session. To specify or change the warehouse for a session, use the USE WAREHOUSE command.

  • available (str, optional) – Percentage of the warehouse compute resources that are provisioned and available.

  • provisioning (str, optional) – Percentage of the warehouse compute resources that are in the process of provisioning.

  • quiescing (str, optional) – Percentage of the warehouse compute resources that are executing SQL statements, but will be shut down once the queries complete.

  • other (str, optional) – Percentage of the warehouse compute resources that are in a state other than available, provisioning, or quiescing.

  • created_on (datetime, optional) – Date and time when the warehouse was created.

  • resumed_on (datetime, optional) – Date and time when the warehouse was last started or restarted.

  • updated_on (datetime, optional) – Date and time when the warehouse was last updated, which includes changing any of the properties of the warehouse or changing the state (STARTED, SUSPENDED, RESIZING) of the warehouse.

  • owner (str, optional) – Role that owns the warehouse.

  • budget (str, optional) – Comment representing budget for warehouse.

  • kind (str, optional)

  • owner_role_type (str, optional) – The type of role that owns the object.

Methods

classmethod from_dict(obj: dict) WarehouseModel

Creates an instance of Warehouse from a dict.

This method constructs a Warehouse object from a dictionary with the key-value pairs of its properties.

Parameters:

obj (dict) – A dictionary whose keys and values correspond to the properties of the resource object.

Returns:

A Warehouse object created using the input dictionary; this will fail if the required properties are missing.

Return type:

Warehouse

to_dict()

Creates a dictionary of the properties from a Warehouse.

This method constructs a dictionary with the key-value entries corresponding to the properties of the Warehouse object.

Returns:

A dictionary object created using the input model.

Return type:

dict

Language: English