Skip to content

Warehouse

You can provide configuration to Snowflake Object Lifecycle Engine for the following operation with the warehouse:

  • Manage the lifecycle of new and existing warehouses
  • Manage the grants of a warehouse

Usage

- warehouse:
    name: <warehouse-name>
    <configuration-key>: <value>
    grants:
      <privilege>:
        - rel(role.<role-name>)
        - rel(role.<role-name>)
warehouses:
  <warehouse-name>:
    <configuration-key>: <value>
    grants:
      <privilege>:
        - <role-name>
        - <role-name>

Supported parameters

The engine supports the parameters listed below.

Configuration Key Required/Optional Data Types and Values Description
auto_resume Optional Boolean Specifies whether to automatically resume a warehouse when a SQL statement (e.g. query) is submitted to it
auto_suspend Optional Integer: Minimum allowed value is 40 Specifies the number of seconds of inactivity after which a warehouse is automatically suspended
comment Optional String Specifies a comment for the warehouse
deleted Optional Boolean: True enables deletion prevention, False does nothing Specifies what objects are allowed to be deleted
depends_on Optional List of String: See Object Dependencies for a definition of depends_on List of SOLE-managed objects that this user depends on. Objects defined in the list will be added to the generated HCL dependencies list to ensure proper creation order.
environment Optional String Specifies the environment in which the warehouse is managed. Regex can be provided as well.
generation Optional Integer: 1, 2 Specifies the hardware generation of the virtual warehouse. Use 1 for Gen1 and 2 for Gen2. This parameter replaces the use of STANDARD_GEN_1 and STANDARD_GEN_2 values in resource_constraint for specifying warehouse hardware generation (required as of Snowflake BCR bundle 2026_02). Note: Only applicable to STANDARD warehouses; not supported for SNOWPARK-OPTIMIZED warehouses.
grants Optional Map: See Supported Warehouse Grants to Roles List of Privileges and Roles to which privileges are granted on the current warehouse
initially_suspended Optional Boolean Specifies whether the warehouse is created initially in the 'suspended' state.
Note: Setting this value will cause the warehouse to be recreated on each SOLE run.
manage_mode Optional String: all (default), none, grants Configures what properties to manage for the warehouse.
See Changing Manage Mode before changing the value.
max_concurrency_level Optional Number Specifies the concurrency level for SQL statements (i.e. queries and DML) executed by a warehouse
max_cluster_count Optional Integer Specifies the maximum number of server clusters for the warehouse
namespacing Optional String: both (default), none, prefix, suffix Specifies whether prefix or suffix or both are to be added to warehouse name - doesn't apply to the default database.
resource_monitor Optional String Specifies the name of a resource monitor that is explicitly assigned to the warehouse.
Caution: The resource monitors set for the account cannot have any warehouses referencing them.
scaling_policy Optional String: STANDARD, ECONOMY Specifies the policy for automatically starting and shutting down clusters in a multi-cluster warehouse running in auto-scale mode
statement_timeout_in_seconds Optional Number Specifies the time, in seconds, after which a running SQL statement (query, DDL, DML, etc.) is canceled by the system
statement_queued_timeout_in_seconds Optional Number Specifies the time, in seconds, a SQL statement (query, DDL, DML, etc.) can be queued on a warehouse before it is canceled by the system
warehouse_size, size Optional String: XSMALL (default), X-SMALL, SMALL, MEDIUM, LARGE, XLARGE, X-LARGE, X2LARGE, 2X-LARGE, XXXLARGE, X3LARGE, 3X-LARGE, X4LARGE, 4X-LARGE, X5LARGE, 5X-LARGE, X6LARGE, 6X-LARGE Specifies the size of the virtual warehouse. Note: X5LARGE/5X-LARGE and X6LARGE/6X-LARGE sizes are not supported when using generation = 2
warehouse_type Optional String: STANDARD (default), SNOWPARK-OPTIMIZED Specifies the type of the virtual warehouse
query_acceleration_max_scale_factor Optional Number: 8 (default) Specifies the maximum scale factor to free compute resources and accelerate the query workload in a warehouse. The scale factor is used as a multiplier based on warehouse size. The larger the warehouse, the larger the scale factor should be. Valid values are 0 to 100.
enable_query_acceleration Optional Boolean Specifies whether to enable the query acceleration service that speeds up the processing of queries while reducing their demand on the warehouse compute resources. See Using the Query Acceleration Service for more information.
resource_constraint Optional String: STANDARD_GEN_1, STANDARD_GEN_2, MEMORY_1X, MEMORY_1X_x86, MEMORY_16X, MEMORY_16X_x86, MEMORY_64X, MEMORY_64X_x86 Specifies the compute resource constraint for the warehouse. This setting determines the memory-to-core ratio or hardware generation to be used. See STANDARD_GEN2 Warehouses and Using the resource_constraint for more information

Warehouse types

SOLE supports creating two Snowflake virtual warehouse types:

  • STANDARD (default)
  • SNOWPARK-OPTIMIZED

Snowflake virtual warehouses provide the resources to execute SQL queries and perform different operations. A warehouse is also defined by its size and the other properties you can set in SOLE to help control and automate the warehouse activities.

SNOWPARK-OPTIMIZED warehouse

SNOWPARK-OPTIMIZED warehouses are recommended for workloads requiring large memory. These warehouses provide 16x memory per node compared to a STANDARD Snowflake virtual warehouse.

Read more about Snowpark-optimized Warehouses in the Snowflake documentation.

The following warehouse_sizes are supported when creating a SNOWPARK-OPTIMIZED warehouse in SOLE: - SMALL - XSMALL, X-SMALL - MEDIUM - LARGE - XLARGE, X-LARGE - XXLARGE, X2LARGE, 2X-LARGE - XXXLARGE, X3LARGE, 3X-LARGE - X4LARGE, 4X-LARGE

Altering warehouse type

While the warehouse is in running status, you cannot alter the type. To alter the warehouse type:

  1. Suspend the warehouse using the following command:
ALTER WAREHOUSE <warehouse-name> SUSPEND
  1. In SOLE, modify the warehouse_type property to use the new value and run a pipeline.

Note

You cannot alter the warehouse type to SNOWPARK-OPTIMIZED if its size is X-SMALL as SNOWPARK-OPTIMIZED warehouses don't support this size. Check the following topic for more detail.

Converting STANDARD to SNOWPARK-OPTIMIZED

The default warehouse size is set to X-SMALL for a STANDARD warehouse. Snowflake would use this default when creating the warehouse if not specified explicitly.

As X-SMALL is not supported with the SNOWPARK-OPTIMIZED warehouses, you must explicitly set the warehouse_size property to MEDIUM or something larger.

If you explicitly set the warehouse_size to X-SMALL or SMALL, you must update the value to MEDIUM or something larger to alter the warehouse type successfully.

STANDARD_GEN2 Warehouses

STANDARD_GEN2 warehouses offer improved performance and resource efficiency compared to STANDARD_GEN1 warehouses.

Key Benefits

  • Better Performance: Faster query execution, especially for complex operations and large scans
  • More Efficient: Queries often consume fewer credits due to faster completion
  • Future-Ready: Default for new accounts and Snowflake's preferred direction

Important Limitations

  • Size Restrictions: X5LARGE and X6LARGE sizes are not supported when using Gen2
  • Standard Warehouses Only: Cannot be applied to Snowpark-Optimized warehouses
  • Region Availability: Not available in all cloud regions. See Region Availability

Configuration with the generation parameter

Snowflake BCR 2026_02 Breaking Change

As of the Snowflake 2026_02 BCR bundle (BCR-2225), specifying warehouse hardware generation using resource_constraint = STANDARD_GEN_1 or resource_constraint = STANDARD_GEN_2 is no longer supported and will result in an SQL error.

Use the generation parameter with numeric values instead: - generation: 1 — Standard Gen1 warehouse - generation: 2 — Standard Gen2 warehouse

  • If generation is not specified, Snowflake defaults based on account settings and region
  • Explicitly set generation: 2 to guarantee Gen2 usage
  • Suspend the warehouse before changing the generation to avoid double billing

In-Place changes

Using non-uppercase values for warehouse_size leads to in-place changes when running a PLAN or APPLY for a warehouse.

The value of warehouse_size is converted to the uppercase equivalent when the object is created in Snowflake and the value is saved in the local state as well. Due to this, when subsequent pipelines are run, the engine assumes that a change has to be made to convert the uppercase value to the specified size.

To reduce the number of in-place changes, we suggest using uppercase values for the warehouse Size, such as XSMALL or 2X-LARGE, instead of xsmall or 2x-large.

Supported warehouse grants to roles

Following are the privileges you can grant to roles in the warehouse definition:

  • ALL PRIVILEGES
  • MODIFY
  • MONITOR
  • USAGE
  • OPERATE
  • OWNERSHIP

ALL PRIVILEGES handling

When you define ALL PRIVILEGES in the SOLE configuration file, you grant all the privileges listed above to roles on this object except OWNERSHIP. However, the management of ALL PRIVILEGES in SOLE differs from its handling in Snowflake. See Handling ALL PRIVILEGES in SOLE for more information.

Examples

Warehouses with configured parameters

- warehouse:
    name: DEMO_WAREHOUSE_2
    comment: Test Comment
    warehouse_size: X-SMALL
    ## Please comment out max_cluster_count, min_cluster_count and scaling_policy if you are using a standard snowflake account.
    ## Read more on snowflake account types here: https://docs.snowflake.com/en/user-guide/intro-editions.html
    max_cluster_count: 2
    min_cluster_count: 1
    auto_suspend: 100
    auto_resume: true
    initially_suspended: true
    scaling_policy: standard
    statement_timeout_in_seconds: 23

- warehouse:
    name: DEMO_WAREHOUSE_3
    comment: Warehouse with Auto-resumed disabled
    warehouse_size: X3LARGE
    max_cluster_count: 5
    auto_suspend: 300
    auto_resume: false
    ## Please comment out max_cluster_count, min_cluster_count and scaling_policy if you are using a standard snowflake account.
    ## Read more on snowflake account types here: https://docs.snowflake.com/en/user-guide/intro-editions.html
    scaling_policy: ECONOMY
warehouses:
  DEMO_WAREHOUSE_2:
    comment: Test Comment
    warehouse_size: X-SMALL
    ## Please comment out max_cluster_count, min_cluster_count and scaling_policy if you are using a standard snowflake account.
    ## Read more on snowflake account types here: https://docs.snowflake.com/en/user-guide/intro-editions.html
    max_cluster_count: 2
    min_cluster_count: 1
    auto_suspend: 100
    auto_resume: true
    initially_suspended: true
    scaling_policy: standard
    statement_timeout_in_seconds: 23

  DEMO_WAREHOUSE_3:
    comment: Warehouse with Auto-resumed disabled
    warehouse_size: X3LARGE
    max_cluster_count: 5
    auto_suspend: 300
    auto_resume: false
    ## Please comment out max_cluster_count, min_cluster_count and scaling_policy if you are using a standard snowflake account.
    ## Read more on snowflake account types here: https://docs.snowflake.com/en/user-guide/intro-editions.html
    scaling_policy: ECONOMY

Warehouses with MODIFY and MONITOR privileges granted only to the role SYSADMIN

This would implicitly revoke all grants on privileges USAGE and OPERATE.

- warehouse:
    name: DEMO_WAREHOUSE_4
    comment: Test Comment
    warehouse_size: X-LARGE
    auto_resume: true
    initially_suspended: true
    grants:
      MODIFY:
        - SYSADMIN
      monitor:
        - SYSADMIN
warehouses:
  DEMO_WAREHOUSE_4:
    comment: Test Comment
    warehouse_size: X-LARGE
    auto_resume: true
    initially_suspended: true
    grants:
      MODIFY:
        - SYSADMIN
      monitor:
        - SYSADMIN

Warehouses all privileges revoked

- warehouse:
    name: DEMO_WAREHOUSE_5
    comment: Test Comment
    warehouse_size: x-large
    auto_resume: true
    initially_suspended: true
    grants:
warehouses:
  DEMO_WAREHOUSE_5:
    comment: Test Comment
    warehouse_size: x-large
    auto_resume: true
    initially_suspended: true
    grants:

Warehouses with resource constraint

- warehouse:
    name: DEMO_WAREHOUSE_5
    comment: Test Comment
    warehouse_size: 4x-large
    warehouse_type: SNOWPARK-OPTIMIZED
    resource_constraint: MEMORY_64X
    auto_resume: true
    initially_suspended: true
warehouses:
  DEMO_WAREHOUSE_5:
    comment: Test Comment
    warehouse_size: 4x-large
    warehouse_type: SNOWPARK-OPTIMIZED
    resource_constraint: MEMORY_64X
    auto_resume: true
    initially_suspended: true

STANDARD_GEN2 warehouse with all properties

- warehouse:
    name: DEMO_WAREHOUSE_15
    comment: "Warehouse with all properties defined"
    warehouse_size: 4X-LARGE
    max_cluster_count: 3
    min_cluster_count: 2
    generation: 2
    scaling_policy: STANDARD
    auto_suspend: 300
    auto_resume: false
    enable_query_acceleration: false
    query_acceleration_max_scale_factor: 9
warehouses:
  DEMO_WAREHOUSE_15:
    comment: "Warehouse with all properties defined"
    warehouse_size: 4X-LARGE
    max_cluster_count: 3
    min_cluster_count: 2
    generation: 2
    scaling_policy: STANDARD
    auto_suspend: 300
    auto_resume: false
    enable_query_acceleration: false
    query_acceleration_max_scale_factor: 9

Note

This example demonstrates a STANDARD_GEN2 warehouse configuration. Note that X5LARGE and X6LARGE sizes are not supported with STANDARD_GEN_2 resource constraint.