ALTER WAREHOUSE
Suspends, resumes, or modifies settings of an existing warehouse.
Syntax
-- Suspend or resume a warehouse
ALTER WAREHOUSE <warehouse_name> { SUSPEND | RESUME }
-- Modify warehouse settings
ALTER WAREHOUSE <warehouse_name>
SET [ warehouse_size = <size> ]
[ auto_suspend = <nullable_unsigned_number> ]
[ auto_resume = <bool> ]
[ max_cluster_count = <nullable_unsigned_number> ]
[ min_cluster_count = <nullable_unsigned_number> ]
[ comment = '<string_literal>' ]
ALTER WAREHOUSE <warehouse_name> SET TAG <tag_name> = '<tag_value>' [ , <tag_name> = '<tag_value>' ... ]
ALTER WAREHOUSE <warehouse_name> UNSET TAG <tag_name> [ , <tag_name> ... ]
ALTER WAREHOUSE <warehouse_name> RENAME TO <new_name>
Options
The SET clause accepts the same options as CREATE WAREHOUSE:
NULLis valid for numeric options to reset them to0.- Supplying
SETwith no options raises an error. SET TAGadds or updates one or more tags. Multiple tags can be set in a single statement separated by commas.UNSET TAGremoves one or more tags by their keys. Non-existent tag keys are silently ignored.RENAME TOrequires the warehouse to be suspended and uses the same naming rules asCREATE.
Examples
Suspend a warehouse:
ALTER WAREHOUSE 'my-wh' SUSPEND;
Resume a warehouse:
ALTER WAREHOUSE 'my-wh' RESUME;
Modify warehouse settings:
ALTER WAREHOUSE 'my-wh'
SET warehouse_size = Large
auto_resume = TRUE
comment = 'Serving tier';
Disable auto-suspend:
ALTER WAREHOUSE 'my-wh' SET auto_suspend = NULL;
Manage tags:
ALTER WAREHOUSE 'wh-hot' SET TAG environment = 'production';
ALTER WAREHOUSE 'wh-hot' SET TAG environment = 'staging', owner = 'john', cost_center = 'eng';
ALTER WAREHOUSE 'wh-hot' UNSET TAG environment;
ALTER WAREHOUSE 'wh-hot' UNSET TAG environment, owner, cost_center;