When to Use a Snowpark-optimized Warehouse
Snowpark workloads can be run on both Standard and Snowpark-optimized warehouses. Snowpark-optimized warehouses are recommended for workloads that have large memory requirements such as ML training use cases using a stored procedure on a single virtual warehouse node. Initial creation and resumption of a Snowpark-optimized virtual warehouse may take longer than standard warehouses. Additionally, Snowpark workloads, utilizing UDF or UDTF, may also benefit from Snowpark-optimized warehouses.
Creating a Snowpark-optimized Warehouse
Use the warehouse_type
property in the CREATE WAREHOUSE command to create a new Snowpark-optimized warehouse.
Create a new Snowpark-optimized warehouse snowpark_opt_wh
:
CREATE OR REPLACE WAREHOUSE snowpark_opt_wh WITH
WAREHOUSE_SIZE= ‘MEDIUM’
WAREHOUSE_TYPE = ‘SNOWPARK-OPTIMIZED’;
Tip
To maximize CPU and memory resources when running Snowpark UDFs or stored procedures, set the MAX_CONCURRENCY_LEVEL parameter for your warehouse when using the CREATE WAREHOUSE or ALTER WAREHOUSE command. For example:alterwarehouse snowpark_opt_wh set max_concurrency_level = 1;
To verify the compute resources for your warehouse have been fully provisioned, use SHOW WAREHOUSES to check its state
.