19 October 2018        Add to Favorites   Report

CREATE WAREHOUSE Command syntax in Snowflake

Snowflake uses virtual warehouses to execute any tasks that required Computing power. While creating a virtual warehouse we also specify the CPU Size that we need. The CPU's are available in T-Shirt sizes, based on your workload you can choose anything from XS, S, M, L to 4X-LARGE

Example:

CREATE WAREHOUSE MARKETING_TEAM_WAREHOUSE
WITH
WAREHOUSE_SIZE = XLARGE
MAX_CLUSTER_COUNT = 5
MIN_CLUSTER_COUNT = 1
SCALING_POLICY = STANDARD
AUTO_SUSPEND = 300
AUTO_RESUME = TRUE
INITIALLY_SUSPENDED = TRUE
MAX_CONCURRENCY_LEVEL = 100
STATEMENT_QUEUED_TIMEOUT_IN_SECONDS = 600
STATEMENT_TIMEOUT_IN_SECONDS = 6000;

Syntax:

CREATE [ OR REPLACE ] WAREHOUSE [ IF NOT EXISTS ] <name>
[ WITH ]
[
WAREHOUSE_SIZE = XSMALL | SMALL | MEDIUM | LARGE | XLARGE | XXLARGE | XXXLARGE | X4LARGE
MAX_CLUSTER_COUNT = <num>
MIN_CLUSTER_COUNT = <num>
SCALING_POLICY = STANDARD | ECONOMY
AUTO_SUSPEND = <num>
AUTO_RESUME = TRUE | FALSE
INITIALLY_SUSPENDED = TRUE | FALSE
RESOURCE_MONITOR = <string>
]
[
MAX_CONCURRENCY_LEVEL = <num>
STATEMENT_QUEUED_TIMEOUT_IN_SECONDS = <num>
STATEMENT_TIMEOUT_IN_SECONDS = <num>
]
[COMMENT = '<string_literal>']



Read great educational content like this and a lot more !

Members get free exclusive access to content, new courses, and discounts. Signup for a free account to write a post / comment / upvote posts. Creating an account takes less than 5 seconds and you can start earning badges & points too

Copied