In just four easy steps, you can install Kumo as a native Snowflake app to generate high-quality predictions, while keeping your data safely inside your Snowflake environment.
Get access to Kumo from the Snowflake Marketplace
Install Kumo
Setup Kumo (create necessary databases, roles, network rules, and privileges for Kumo)
Before installing and configuring Kumo as a native Snowflake application, ensure that you have completed the following:
Accept the Consumer terms of service for Snowflake marketplace. This needs to be done by a user with an ORGADMIN role.
Accept terms of service to enable third party python packages. This needs to be done by a user with an ORGADMIN role.
An account-level event table is configured. This can be verified by running SHOW PARAMETERS LIKE 'event_table' IN ACCOUNT. If an event table is not configured, follow the steps to create an event table and associate it with your account.
Currently supported settings for Kumo’s Native App:
The Kumo Native app needs to be installed/set up by a Snowflake account administrator or a user who has ACCOUNTADMIN privileges on the account. It can be set up
either using (a) Snowsight or (b) SQL (preferable for automation). The following describes both ways of setting up the native app.
The following SQL script creates the databases, roles, network rules and privileges required to setup Kumo in your account. It uses the ACCOUNTADMIN role and a user with that role should execute it.
You are required to provide the warehouse name. Note that ACCOUNTADMIN must have USAGE privilege on the warehouse provided.
Set the name of the Kumo Native app if a different name was used when the app was installed from the marketplace. The app name defaults to KUMO .
-------------------------------- USER INPUT REQUIRED --------------------------------SET USER_WAREHOUSE ='<ADD WAREHOUSE TO USE>';-- (Optional) Modify the following if a different name was used to install the app.SET KUMOAPP_NAME ='KUMO';SET KUMOAPP_DB ='KUMO_APP_DB';SET KUMOAPP_USR = CONCAT(($KUMOAPP_NAME),'.APP_USER');USE ROLE ACCOUNTADMIN;USE WAREHOUSE IDENTIFIER($USER_WAREHOUSE);-- Grant BIND SERVICE ENDPOINT privilege to the Kumo application to enable-- network ingress and access to the Kumo UI for users of Kumo in your account.-- Details of the privilige can be found here-- https://other-docs.snowflake.com/LIMITEDACCESS/native-apps/na-spcs-consumer#set-up-access-to-network-objectsGRANT BIND SERVICE ENDPOINT ON ACCOUNT TO APPLICATION IDENTIFIER($KUMOAPP_NAME);-- Grant CREATE COMPUTE POOL privilege to allow the Kumo application to create compute pools-- This allows for efficient management of compute pools by Kumo.GRANTCREATECOMPUTE POOL ON ACCOUNT TO APPLICATION IDENTIFIER($KUMOAPP_NAME);-- Share events from the application with the provider, KUMO.AIALTER APPLICATION IDENTIFIER($KUMOAPP_NAME)SET AUTHORIZE_TELEMETRY_EVENT_SHARING=true;-- Database and schema to hold network rules for the Kumo application along-- with usage for the Kumo application.CREATEDATABASEIFNOTEXISTS IDENTIFIER($KUMOAPP_DB);USEDATABASE IDENTIFIER($KUMOAPP_DB);CREATESCHEMAIFNOTEXISTS KUMO_SCHEMA;USESCHEMA KUMO_SCHEMA;----------------------- EGRESS RULES FOR KUMO---------------------CREATEORREPLACEPROCEDURE CREATE_EGRESS_RULES(kumo_app_name varchar)RETURNS STRINGLANGUAGE PYTHONRUNTIME_VERSION ='3.10'PACKAGES =('snowflake-snowpark-python')HANDLER='create_egress_rule'EXECUTEAS CALLERAS$$import jsondef create_egress_rule(session, kumo_app_name):df =session.sql(f"CALL {kumo_app_name}.PROCEDURES.GET_CONFIGURATION('KUMO_EXTERNAL_ACCESS_INTEGRATION')").collect()result = json.loads(df[0][0])if"payload"notin result or"host_ports"notin result["payload"]orlen(result["payload"]["host_ports"])==0: raise RuntimeError(f'Error creating egress rules: {result}')hosts = result["payload"]["host_ports"]session.sql(f"""CREATEORREPLACE NETWORK RULE kumo_network_ruleMODE= EGRESSTYPE= HOST_PORT VALUE_LIST =({', '.join(f"'{item}'"for item in hosts)})""").collect()session.sql("""CREATEORREPLACE EXTERNAL ACCESS INTEGRATION KUMO_EXTERNAL_ACCESS_INTEGRATION ALLOWED_NETWORK_RULES =(kumo_network_rule) ENABLED =true""").collect()session.sql(f"GRANT USAGE ON INTEGRATION KUMO_EXTERNAL_ACCESS_INTEGRATION TO APPLICATION {kumo_app_name}").collect()session.sql(f"CALL {kumo_app_name}.PROCEDURES.register_single_callback('KUMO_EXTERNAL_ACCESS_INTEGRATION', 'ADD', SYSTEM$REFERENCE('external_access_integration', 'KUMO_EXTERNAL_ACCESS_INTEGRATION_APP', 'PERSISTENT'))").collect()return f"Created egress rules and external access integration for {hosts}"$$;CALL CREATE_EGRESS_RULES($KUMOAPP_NAME);-------------------------- Create KUMO_USER_ROLE and grant necessary privileges. This role can be assigned to-- any Snowflake user who is expected to use the Kumo application.CREATE ROLE IFNOTEXISTS KUMO_USER_ROLE;-- Grant the Application role to KUMO_USER_ROLE.GRANT APPLICATION ROLE IDENTIFIER($KUMOAPP_USR)TO ROLE KUMO_USER_ROLE;-- Grant USAGE on the database, schema and warehouse to KUMO_USER_ROLE.GRANTUSAGEONDATABASE IDENTIFIER($KUMOAPP_DB)TO ROLE KUMO_USER_ROLE;GRANTUSAGEONALL SCHEMAS INDATABASE IDENTIFIER($KUMOAPP_DB)TO ROLE KUMO_USER_ROLE;GRANTUSAGEON WAREHOUSE IDENTIFIER($USER_WAREHOUSE)TO ROLE KUMO_USER_ROLE;
The Snowflake administrator can provide access to the Kumo app to other users with the following commands.
Modify <DEFAULT_USER_ROLE> to the role used by the user to start and use Kumo.
-------------------------------- USER INPUT REQUIRED --------------------------------USE ROLE ACCOUNTADMIN;-- Grant the KUMO_USER_ROLE to the DEFAULT_ROLE of any user who are expected to use the Kumo application.GRANT ROLE KUMO_USER_ROLE TO ROLE <DEFAULT_USER_ROLE>;
Navigate to the app from “Data products” -> “Apps” -> “Kumo” and click on “Activate”. This step can take 20 to 30mins.
Once the activation is complete in (3), you can access Kumo by clicking the “Launch” button. You will be re-directed to a URL where you can login with your
snowflake credentials.
Launch the Kumo app using the following commands. Note that KUMO_USER_ROLE should have privileges to use the warehouse provided in the command below.
-------------------------------- USER INPUT REQUIRED ---------------------------------- Note that KUMO_USER_ROLE should be granted usage on this warehouse.SET USER_WAREHOUSE ='<ADD WAREHOUSE TO USE>';-- Modify the following if a different name was used to install the app.SET KUMOAPP_NAME ='KUMO';USE ROLE KUMO_USER_ROLE;USE WAREHOUSE IDENTIFIER($USER_WAREHOUSE);SET KUMOAPP_COMPUTE = CONCAT(($KUMOAPP_NAME),'.PROCEDURES.START_APP');CALL IDENTIFIER($KUMOAPP_COMPUTE)('USER_SCHEMA');
The above command returns the URL to use to access Kumo and can take 20-30 minutes to complete. DO NOT abort this command as this might leave the app in an inconsistent state.
Navigate to the URL from the above command in your preferred browser. Login using your Snowflake credentials and you will see the Kumo UI.
The following steps can be used to manage the lifecycle of the Kumo Native app. Users can invoke these based on the specific operations they need to perform.
Once you are done using Kumo, you can stop the Kumo application using the following command:
SET KUMOAPP_NAME ='KUMO';SET KUMOAPP_STOP = CONCAT(($KUMOAPP_NAME),'.PROCEDURES.SHUTDOWN_APP');CALL IDENTIFIER($KUMOAPP_STOP)('USER_SCHEMA');
Note: Once the app is shutdown, it can restarted using the START_APPprocedure above. Note that restarting the Kumo app will generate a new url to access it.
You can reset your account and remove all objects associated with Kumo using the following script. Note that this will permanently delete all metadata, data and models trained with the Kumo Native app and this cannot be reverted. Please reach out to Kumo support if you have any questions regarding the deletion of your Kumo app.
-- Description: This script is used to reset the account to the initial state before the Kumo app setup.-- NOTE: All the objects created for the Kumo app will be deleted.-- Any models trained or data stored in the Kumo app will be lost.USE ROLE ACCOUNTADMIN;-------------------------------- USER INPUT REQUIRED --------------------------------SET USER_WAREHOUSE ='<ADD WAREHOUSE TO USE>';SET KUMOAPP_NAME ='KUMO';SET KUMOAPP_DB ='KUMO_APP_DB';USE WAREHOUSE IDENTIFIER($USER_WAREHOUSE);-- Delete the Kumo application and all associated objects.DROP APPLICATION IFEXISTS IDENTIFIER($KUMOAPP_NAME)CASCADE;-- Drop the role created for the user of Kumo app.DROP ROLE IFEXISTS KUMO_USER_ROLE;-- Drop the external access rule created for the Kump app.DROP EXTERNAL ACCESS INTEGRATION IFEXISTS KUMO_EXTERNAL_ACCESS_INTEGRATION;USEDATABASE IDENTIFIER($KUMOAPP_DB);CREATEORREPLACEPROCEDURE DROP_ALL_NETWORK_RULES(db_name varchar)RETURNS STRINGLANGUAGE PYTHONRUNTIME_VERSION ='3.8'PACKAGES =('snowflake-snowpark-python')HANDLER='main'AS$$def main(session, db_name):""" Method todropall network egress rules created for Kumo."""# get allow list and db_names =session.sql(f"SHOW DATABASES like '{db_name}'").collect()iflen(db_names)==0:return f"No Database found with name {db_name}. No rules to delete"rows=session.sql(f"SHOW NETWORK RULES IN DATABASE {db_name}").collect() dropped_rules =[]forrowinrows: row_dict =row.as_dict()if'name'in row_dict:rule= f"{db_name}.{row_dict['schema_name']}.{row_dict['name']}"session.sql(f"DROP NETWORK RULE IF EXISTS {rule}").collect() dropped_rules.append(rule)return f"Successfully deleted {len(rows)} network rules in Database {db_name}: {', '.join(dropped_rules)}"$$;CALL DROP_ALL_NETWORK_RULES($KUMOAPP_DB);-- Drop Database created for the Kumo appDROPDATABASEIFEXISTS IDENTIFIER($KUMOAPP_DB);
Be sure to share ALL events from the native app so that Kumo can provide any necessary operational support—this is required when using Kumo’s Snowflake native app. You can examine the logs and events shared with Kumo using the event table configured for your account. See Snowflake’s documentation for more details about event sharing.
Instructions to configure event sharing is below. Note that in both cases an event table must be configured for your Snowflake account. See Setting up an event table for details.
Using Snowsight: If you have an existing Kumo app installation, you can easily enable mandatory events in Snowsight by going to Data Products -> Apps -> Kumo -> Events and Logs. On the Events and Logstab, toggle the All events button in the Events and logs sharing section.
Using SQL: The above event sharing can also be enabled using the following commands:
-- Set app name if it's different from the default.SET KUMOAPP_NAME ='KUMO';-- Enables event sharing for the Native app.ALTER APPLICATION IDENTIFIER($KUMOAPP_NAME)SET AUTHORIZE_TELEMETRY_EVENT_SHARING=true;
All mandatory events will be enabled by default when installing Kumo. You will be notified of this when attempting to install the Kumo app. Note that an event table must be configured for your account to ensure installation can proceed.
Using Kumo without granting CREATE COMPUTE POOL privileges
We strongly recommend granting the CREATE COMPUTE POOL privilege to the Kumo native app as described above. This allows
the app to intelligently manage the required compute pools — for example, as the Kumo platform evolves, we will change the types
of compute pools used to building models in a cost-efficient manner. To control costs, usage limits can be set on the native app using Snowflake budgets.
However, if you intend to manage the compute pools yourself, the Kumo application can be started using the following commands instead of the
commands in Step 4 above depending on the underlying cloud platform where your Snowflake account is hosted.
For legacy users who use a single GPU compute pool on AWS, see instructions below.
-- Use the ACCOUNTADMIN role or any role that has the privileges to create compute pools.USE ROLE ACCOUNTADMIN;SET USER_WAREHOUSE ='<ADD WAREHOUSE TO USE>';-------------------------------- USER INPUT REQUIRED --------------------------------USE WAREHOUSE IDENTIFIER($USER_WAREHOUSE);-- Modify the following if a different name was used to install the app.SET KUMOAPP_NAME ='KUMO';CREATECOMPUTE POOL IFNOTEXISTS KUMO_CONTROL_PLANE_POOLFOR APPLICATION IDENTIFIER($KUMOAPP_NAME) min_nodes =1 max_nodes =1 instance_family ='CPU_X64_L' INITIALLY_SUSPENDED =TRUE AUTO_SUSPEND_SECS =600;CREATECOMPUTE POOL IFNOTEXISTS KUMO_COMPUTE_PLANE_POOL_GPU_NV_SFOR APPLICATION IDENTIFIER($KUMOAPP_NAME) min_nodes =1 max_nodes =1 instance_family ='GPU_NV_S' INITIALLY_SUSPENDED =TRUE AUTO_SUSPEND_SECS =600;CREATECOMPUTE POOL IFNOTEXISTS KUMO_COMPUTE_PLANE_POOL_GPU_NV_MFOR APPLICATION IDENTIFIER($KUMOAPP_NAME) min_nodes =1 max_nodes =1 instance_family ='GPU_NV_M' INITIALLY_SUSPENDED =TRUE AUTO_SUSPEND_SECS =600;CREATECOMPUTE POOL IFNOTEXISTS KUMO_COMPUTE_PLANE_POOL_HIGHMEM_X64_SFOR APPLICATION IDENTIFIER($KUMOAPP_NAME) min_nodes =1 max_nodes =1 instance_family ='HIGHMEM_X64_S' INITIALLY_SUSPENDED =TRUE AUTO_SUSPEND_SECS =600;CREATECOMPUTE POOL IFNOTEXISTS KUMO_COMPUTE_PLANE_POOL_HIGHMEM_X64_MFOR APPLICATION IDENTIFIER($KUMOAPP_NAME) min_nodes =1 max_nodes =1 instance_family ='HIGHMEM_X64_M' INITIALLY_SUSPENDED =TRUE AUTO_SUSPEND_SECS =600;CREATECOMPUTE POOL IFNOTEXISTS KUMO_COMPUTE_PLANE_POOL_HIGHMEM_X64_LFOR APPLICATION IDENTIFIER($KUMOAPP_NAME) min_nodes =1 max_nodes =1 instance_family ='HIGHMEM_X64_L' INITIALLY_SUSPENDED =TRUE AUTO_SUSPEND_SECS =600;GRANTUSAGEONCOMPUTE POOL KUMO_CONTROL_PLANE_POOL to APPLICATION IDENTIFIER($KUMOAPP_NAME);GRANTUSAGEONCOMPUTE POOL KUMO_COMPUTE_PLANE_POOL_GPU_NV_S to APPLICATION IDENTIFIER($KUMOAPP_NAME);GRANTUSAGEONCOMPUTE POOL KUMO_COMPUTE_PLANE_POOL_GPU_NV_M to APPLICATION IDENTIFIER($KUMOAPP_NAME);GRANTUSAGEONCOMPUTE POOL KUMO_COMPUTE_PLANE_POOL_HIGHMEM_X64_S to APPLICATION IDENTIFIER($KUMOAPP_NAME);GRANTUSAGEONCOMPUTE POOL KUMO_COMPUTE_PLANE_POOL_HIGHMEM_X64_M to APPLICATION IDENTIFIER($KUMOAPP_NAME);GRANTUSAGEONCOMPUTE POOL KUMO_COMPUTE_PLANE_POOL_HIGHMEM_X64_L to APPLICATION IDENTIFIER($KUMOAPP_NAME);SET KUMOAPP_COMPUTE = CONCAT(($KUMOAPP_NAME),'.PROCEDURES.START_APP');CALL IDENTIFIER($KUMOAPP_COMPUTE)('USER_SCHEMA','KUMO_CONTROL_PLANE_POOL', ARRAY_CONSTRUCT( ARRAY_CONSTRUCT('GPU_NV_S','KUMO_COMPUTE_PLANE_POOL_GPU_NV_S'), ARRAY_CONSTRUCT('GPU_NV_M','KUMO_COMPUTE_PLANE_POOL_GPU_NV_M'), ARRAY_CONSTRUCT('HIGHMEM_X64_S','KUMO_COMPUTE_PLANE_POOL_HIGHMEM_X64_S'), ARRAY_CONSTRUCT('HIGHMEM_X64_M','KUMO_COMPUTE_PLANE_POOL_HIGHMEM_X64_M'), ARRAY_CONSTRUCT('HIGHMEM_X64_L','KUMO_COMPUTE_PLANE_POOL_HIGHMEM_X64_L')));
-------------------------------- USER INPUT REQUIRED ---------------------------------- Note that KUMO_USER_ROLE should be granted usage on this warehouse.SET USER_WAREHOUSE ='<ADD WAREHOUSE TO USE>';USE WAREHOUSE IDENTIFIER($USER_WAREHOUSE);-- Modify the following if a different name was used to install the app.SET KUMOAPP_NAME ='KUMO';-- Use the ACCOUNTADMIN role or any role that has the privileges to create compute pools.USE ROLE ACCOUNTADMIN;CREATECOMPUTE POOL IFNOTEXISTS KUMO_CONTROL_PLANE_POOLFOR APPLICATION IDENTIFIER($KUMOAPP_NAME) min_nodes =1 max_nodes =1 instance_family ='CPU_X64_L' INITIALLY_SUSPENDED =TRUE AUTO_SUSPEND_SECS =600;CREATECOMPUTE POOL IFNOTEXISTS KUMO_COMPUTE_PLANE_POOL_GPU_NV_SMFOR APPLICATION IDENTIFIER($KUMOAPP_NAME) min_nodes =1 max_nodes =1 instance_family ='GPU_NV_SM' INITIALLY_SUSPENDED =TRUE AUTO_SUSPEND_SECS =600;CREATECOMPUTE POOL IFNOTEXISTS KUMO_COMPUTE_PLANE_POOL_GPU_NV_2MFOR APPLICATION IDENTIFIER($KUMOAPP_NAME) min_nodes =1 max_nodes =1 instance_family ='GPU_NV_2M' INITIALLY_SUSPENDED =TRUE AUTO_SUSPEND_SECS =600;CREATECOMPUTE POOL IFNOTEXISTS KUMO_COMPUTE_PLANE_POOL_HIGHMEM_X64_SFOR APPLICATION IDENTIFIER($KUMOAPP_NAME) min_nodes =1 max_nodes =1 instance_family ='HIGHMEM_X64_S' INITIALLY_SUSPENDED =TRUE AUTO_SUSPEND_SECS =600;CREATECOMPUTE POOL IFNOTEXISTS KUMO_COMPUTE_PLANE_POOL_HIGHMEM_X64_MFOR APPLICATION IDENTIFIER($KUMOAPP_NAME) min_nodes =1 max_nodes =1 instance_family ='HIGHMEM_X64_M' INITIALLY_SUSPENDED =TRUE AUTO_SUSPEND_SECS =600;CREATECOMPUTE POOL IFNOTEXISTS KUMO_COMPUTE_PLANE_POOL_HIGHMEM_X64_SLFOR APPLICATION IDENTIFIER($KUMOAPP_NAME) min_nodes =1 max_nodes =1 instance_family ='HIGHMEM_X64_SL' INITIALLY_SUSPENDED =TRUE AUTO_SUSPEND_SECS =600;GRANTUSAGEONCOMPUTE POOL KUMO_CONTROL_PLANE_POOL to APPLICATION IDENTIFIER($KUMOAPP_NAME);GRANTUSAGEONCOMPUTE POOL KUMO_COMPUTE_PLANE_POOL_GPU_NV_SM to APPLICATION IDENTIFIER($KUMOAPP_NAME);GRANTUSAGEONCOMPUTE POOL KUMO_COMPUTE_PLANE_POOL_GPU_NV_2M to APPLICATION IDENTIFIER($KUMOAPP_NAME);GRANTUSAGEONCOMPUTE POOL KUMO_COMPUTE_PLANE_POOL_HIGHMEM_X64_S to APPLICATION IDENTIFIER($KUMOAPP_NAME);GRANTUSAGEONCOMPUTE POOL KUMO_COMPUTE_PLANE_POOL_HIGHMEM_X64_M to APPLICATION IDENTIFIER($KUMOAPP_NAME);GRANTUSAGEONCOMPUTE POOL KUMO_COMPUTE_PLANE_POOL_HIGHMEM_X64_SL to APPLICATION IDENTIFIER($KUMOAPP_NAME);SET KUMOAPP_COMPUTE = CONCAT(($KUMOAPP_NAME),'.PROCEDURES.START_APP');CALL IDENTIFIER($KUMOAPP_COMPUTE)('USER_SCHEMA','KUMO_CONTROL_PLANE_POOL', ARRAY_CONSTRUCT( ARRAY_CONSTRUCT('GPU_NV_SM','KUMO_COMPUTE_PLANE_POOL_GPU_NV_SM'), ARRAY_CONSTRUCT('GPU_NV_2M','KUMO_COMPUTE_PLANE_POOL_GPU_NV_2M'), ARRAY_CONSTRUCT('HIGHMEM_X64_S','KUMO_COMPUTE_PLANE_POOL_HIGHMEM_X64_S'), ARRAY_CONSTRUCT('HIGHMEM_X64_M','KUMO_COMPUTE_PLANE_POOL_HIGHMEM_X64_M'), ARRAY_CONSTRUCT('HIGHMEM_X64_SL','KUMO_COMPUTE_PLANE_POOL_HIGHMEM_X64_SL')));
For legacy users where a single compute pool is used, the Kumo app can be started using the following commands:
-- Modify the following if a different name was used to install the app.SET KUMOAPP_NAME ='KUMO';CREATECOMPUTE POOL IFNOTEXISTS KUMO_COMPUTE_PLANE_POOL_GPU_NV_MFOR APPLICATION IDENTIFIER($KUMOAPP_NAME) min_nodes =1 max_nodes =1 instance_family ='GPU_NV_M' INITIALLY_SUSPENDED =TRUE AUTO_SUSPEND_SECS =600;GRANTUSAGEONCOMPUTE POOL KUMO_COMPUTE_PLANE_POOL_GPU_NV_M to APPLICATION IDENTIFIER($KUMOAPP_NAME);CALL IDENTIFIER($KUMOAPP_COMPUTE)('KUMO_COMPUTE_PLANE_POOL_GPU_NV_M','USER_SCHEMA','GPU_NV_M');