CREATE WAREHOUSE
Creates a new warehouse for compute resources.
Syntax
CREATE WAREHOUSE [ IF NOT EXISTS ] <warehouse_name>
[ WITH ] warehouse_size = <size>
[ WITH ] auto_suspend = <nullable_unsigned_number>
[ WITH ] initially_suspended = <bool>
[ WITH ] auto_resume = <bool>
[ WITH ] max_cluster_count = <nullable_unsigned_number>
[ WITH ] min_cluster_count = <nullable_unsigned_number>
[ WITH ] comment = '<string_literal>'
[ WITH ] TAG ( <tag_name> = '<tag_value>' [ , <tag_name> = '<tag_value>' , ... ] )
Options
- Options may appear in any order and may repeat (the later value wins).
AUTO_SUSPEND,MAX_CLUSTER_COUNT, andMIN_CLUSTER_COUNTaccept= NULLto reset to0.
Examples
This example creates an XLarge warehouse with auto-scaling and custom settings:
CREATE WAREHOUSE IF NOT EXISTS 'etl-wh'
WITH warehouse_size = XLarge
auto_suspend = 600
initially_suspended = TRUE
auto_resume = FALSE
max_cluster_count = 4
min_cluster_count = 2
comment = 'Nightly ETL warehouse'
TAG (environment = 'production', team = 'data-engineering', cost_center = 'analytics');
This example creates a basic Small warehouse:
CREATE WAREHOUSE 'my-warehouse'
WITH warehouse_size = Small;