---
name: warehouse
description: "**[REQUIRED]** Use for **ALL** Snowflake warehouse questions (except interactive warehouses — those use the interactive-warehouse skill). Covers: Gen2 warehouses, warehouse credits, warehouse cost, warehouse pricing, how much does a warehouse cost, warehouse size, create warehouse, alter warehouse, warehouse generation, warehouse performance, warehouse types. Triggers: gen2, generation 2, GENERATION = '2', gen2 credit rate, convert to gen2, gen1 to gen2, gen2 regions, gen2 limitations, gen2 performance, warehouse generation, gen2 benchmark, compare gen1 gen2, DML performance, slow DELETE, slow MERGE, slow resume, resume time, warehouse resume, warehouse credits, warehouse cost, how much is a warehouse, warehouse pricing, warehouse size, create warehouse, alter warehouse."
---

# Warehouse Skill Router

Route warehouse-related questions to the appropriate sub-skill.

> This is an extensible router. Currently gen2-warehouse is the only sub-skill. Future sub-skills (sizing, monitoring, optimization, etc.) will be added here as they are developed.

## When to Use

Activate this skill when the user asks about any of:

- **Gen2 keywords**: "gen2", "generation 2", "GENERATION = '2'", "gen2 credit rate", "convert to gen2", "gen1 to gen2", "gen2 regions", "gen2 limitations", "gen2 performance", "warehouse generation", "gen2 benchmark", "compare gen1 gen2"
- **Performance keywords**: "DML performance", "slow DELETE", "slow MERGE", "slow resume", "resume time", "warehouse resume", "warehouse is slow", "speed up warehouse"
- **Warehouse creation/management**: "create warehouse", "alter warehouse", "warehouse size", "warehouse generation"
- **Warehouse cost/credits**: "warehouse credits", "warehouse cost", "how much is a warehouse", "warehouse pricing", "credits per hour"

## When NOT to Use

**Do NOT use this skill for Interactve Warehouse Questions.**
Questions like "what is an interactive warehouse" or "how do I use an interactive warehouse" should use the `interactive-warehouse` skill.

**Do NOT use this skill for warehouse spending or cost analytics.**
Questions like "how much did my warehouse spend?" or "show me warehouse credits used" belong to the `cost-intelligence` skill, which queries `SNOWFLAKE.ACCOUNT_USAGE`.
This skill covers warehouse configuration, DDL, Gen2, and performance only.

## Routing

Match the user's question to keywords and load the corresponding sub-skill.

| Keywords | Sub-skill to Load |
|----------|-------------------|
| interactive warehouse, create interactive warehouse, add tables to warehouse, remove tables from warehouse, resume interactive warehouse, suspend interactive warehouse | **Route to** `snowflake-interactive` skill |
| gen2, generation 2, GENERATION = '2', create gen2, convert to gen2, gen1 to gen2, gen2 credit rate, gen2 regions, gen2 limitations, gen2 performance, gen2 benchmark, compare gen1 gen2 | **Load** `gen2-warehouse/SKILL.md` |
| DML performance, slow DELETE, slow MERGE, slow UPDATE, slow resume, resume time, warehouse resume, warehouse is slow, speed up warehouse, improve warehouse performance | **Load** `gen2-warehouse/SKILL.md` |
| warehouse creation, warehouse size, warehouse generation, alter warehouse | **Load** `gen2-warehouse/SKILL.md` |
| warehouse credits, warehouse cost, how much is a warehouse, warehouse pricing, credits per hour | **Load** `gen2-warehouse/SKILL.md` |

> **Note:** Interactive warehouse questions route to the `snowflake-interactive` skill. All other warehouse intents route to `gen2-warehouse/SKILL.md`. As new sub-skills are added, this routing table will expand.

## Workflow

### Step 1: Look Up the Warehouse (if a specific warehouse is named)

If the user mentions a **specific warehouse by name**, you **MUST** run a lookup before routing:

```sql
SHOW WAREHOUSES LIKE '<warehouse_name>';
```

**IMPORTANT:** Always use `SHOW WAREHOUSES LIKE '<name>'` with the LIKE clause — do NOT use bare `SHOW WAREHOUSES` as it may fail with `ENABLE_ERROR_ON_FETCH_FALLBACK` errors on some accounts.

From the result, extract and note these columns:

| Column | Why It Matters |
|--------|---------------|
| `type` (warehouse_type) | Determines routing: INTERACTIVE → interactive skill, SNOWPARK-OPTIMIZED → Gen2 unsupported, STANDARD → eligible for Gen2 |
| `generation` | If already `2`, tell the user it's already Gen2. If `1` or empty, may be a Gen2 candidate |
| `size` | Gen2 supports XSMALL through X4LARGE only. X5LARGE and X6LARGE are NOT supported |
| `resource_constraint` | Shows the resource constraint variant (e.g., `STANDARD_GEN_1`, `STANDARD_GEN_2`, `MEMORY_16X`). Confirms generation and warehouse configuration |

**Routing based on lookup results:**

| Condition | Action |
|-----------|--------|
| `type` = `INTERACTIVE` | **Stop.** Tell the user this is an Interactive warehouse — Gen2 does not apply. Route to the `snowflake-interactive` skill for interactive warehouse questions |
| `type` = `SNOWPARK-OPTIMIZED` | **Stop.** Tell the user Gen2 is not available for Snowpark-optimized warehouses. See Gen2 limitations in `gen2-warehouse/SKILL.md` |
| `generation` = `2` | Tell the user the warehouse is already Gen2. No conversion needed |
| `size` = `X5LARGE` or `X6LARGE` | Tell the user Gen2 does not support this size. Suggest benchmarking on a Gen2 X4LARGE |
| `type` = `STANDARD` and `generation` = `1` (or empty) | Eligible for Gen2. Proceed with keyword-based routing below |

**IMPORTANT:** Do NOT skip this lookup. Even if the user's question contains Gen2 keywords, the warehouse type takes priority — an INTERACTIVE warehouse should never receive Gen2 advice.

### Step 2: Detect Intent and Route

If no specific warehouse was named, or after the lookup confirms the warehouse is a STANDARD Gen1 warehouse, match the user's question to keywords and load the matching sub-skill.

### Step 3: Execute Sub-skill

Follow the loaded sub-skill's workflow completely. Each sub-skill is self-contained with its own references, workflows, and stopping points.

## Sub-skills

| Sub-skill | Skill | Purpose |
|-----------|-------|---------|
| Interactive Warehouse | `snowflake-interactive` (full skill name — not a sub-skill of this router) | Interactive warehouse creation, table management, resume/suspend |
| Gen2 Warehouse | `gen2-warehouse/SKILL.md` | Gen2 explanation, creation, conversion, limitations, regions, costs, benchmarking, performance recommendations |

## Stopping Points

- If intent is ambiguous and cannot be mapped to a sub-skill, ask the user to clarify before loading any sub-skill
- Honour all stopping points defined within loaded sub-skills
