Skip to content

feat(warehouse): support adaptive warehouses (CREATE ADAPTIVE WAREHOUSE) #27

Description

@GClunies

What & Why

Snowflake adaptive warehouses (CREATE ADAPTIVE WAREHOUSE) let Snowflake pick size/cluster count automatically, with a MAX_QUERY_PERFORMANCE_LEVEL cap instead of WAREHOUSE_SIZE/MIN|MAX_CLUSTER_COUNT. snowcap/resources/warehouse.py has no notion of adaptive warehouses, so they can't be declared in YAML. (PR #22 added Gen2 support — adaptive is a separate, newer warehouse flavor.)

We currently manage ~11 adaptive warehouses via one-off SQL:

CREATE ADAPTIVE WAREHOUSE IF NOT EXISTS finance_analyst_wh
  WITH MAX_QUERY_PERFORMANCE_LEVEL = LARGE
       STATEMENT_TIMEOUT_IN_SECONDS = 3600;

Acceptance Criteria

  • Adaptive warehouses are declarable in YAML (either adaptive: true on warehouses: or a dedicated resource) including max_query_performance_level
  • Validation rejects properties that don't apply to adaptive warehouses (warehouse_size, min_cluster_count, max_cluster_count, scaling_policy, ...)
  • Fetch/plan round-trips SHOW WAREHOUSES output for adaptive warehouses without spurious drift
  • Grants on adaptive warehouses (USAGE/OPERATE/MONITOR) work like regular warehouses
  • Docs page updated

Resources

  • Snowflake docs: CREATE ADAPTIVE WAREHOUSE / adaptive warehouses
  • Snowcap: snowcap/resources/warehouse.py (no adaptive support today); PR Add Snowflake Gen2 warehouse support #22 (Gen2) for prior art on extending warehouse types

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions