Skip to content

Snowflake: parse CREATE WAREHOUSE#2388

Draft
sabir-akhadov-localstack wants to merge 1 commit into
apache:mainfrom
localstack:pr/03-create-warehouse
Draft

Snowflake: parse CREATE WAREHOUSE#2388
sabir-akhadov-localstack wants to merge 1 commit into
apache:mainfrom
localstack:pr/03-create-warehouse

Conversation

@sabir-akhadov-localstack

Copy link
Copy Markdown
Contributor

Snowflake supports CREATE WAREHOUSE to provision a virtual warehouse, and DROP WAREHOUSE to remove one. Neither parsed before this change.

CREATE OR REPLACE WAREHOUSE my_wh WITH WAREHOUSE_SIZE = 'XSMALL' AUTO_SUSPEND = 60;
DROP WAREHOUSE my_wh;

This adds Statement::CreateWarehouse and ObjectType::Warehouse. The warehouse properties and parameters are captured as KeyValueOptions (the same representation used for CREATE FILE FORMAT and friends), so the statement round-trips losslessly rather than discarding everything after the name. The optional leading WITH and the spaces around = are normalized away on display.

See the Snowflake CREATE WAREHOUSE docs.

Add `Statement::CreateWarehouse` and `ObjectType::Warehouse` so the parser
accepts `CREATE [OR REPLACE] WAREHOUSE [IF NOT EXISTS] <name>` with optional
warehouse properties/parameters, plus `DROP WAREHOUSE`.

Warehouse options are captured as `KeyValueOptions` so the statement
round-trips losslessly instead of discarding everything after the name.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant