RelationalAI Service Management#

The RelationalAI (RAI) Service is the core component of the RAI Native App for Snowflake. It runs in a container on Snowpark Container Services and manages the RAI Engines that execute models and queries written with the relationalai Python package.

Managing the RAI Service#

All service management procedures require the app_admin application role.

Create the Service#

Use the create_service() procedure to start the RAI service:

#CALL relationalai.app.create_service();

When you create the service, the RAI Native App provisions the necessary resources:

Check Service Status#

To check the status of the RAI service, use the service_status() procedure:

#CALL relationalai.app.service_status();

Drop the Service#

You can drop the service to reduce costs when you are not using the RAI Native App. To suspend CDC streams, delete all RAI engines, and drop the service, execute the following commands:

#-- Suspend CDC
CALL relationalai.app.suspend_cdc();

-- List the engines
SELECT * FROM relationalai.api.engines;

-- For each engine name in the output of the above `SELECT` statement (if any),
-- fill in the engine name in the following command and run it
CALL relationalai.api.delete_engine('<engine_name>', TRUE);

-- Drop the service
CALL relationalai.app.drop_service();

Use create_service() to recreate the service and then set up CDC with a new engine:

#-- Recreate the service after dropping it
CALL relationalai.app.create_service();

-- Create a CDC engine
CALL relationalai.api.create_engine('<cdc_engine_name>', 'HIGHMEM_X64_S');

-- Setup CDC
CALL relationalai.app.setup_cdc('<cdc_engine_name>');

relationalai Python package users can recreate their engines using the rai engines:create command in the RAI CLI.

Viewing Application Telemetry#

When you install the RAI Native App, you are prompted to share continuous telemetry data with RelationalAI. This data is written to your account’s active event table and contains operational information such as internal system logs, engine sizes, and usage data. Customer data and personally identifiable information are not included in continuous telemetry data.

See the Snowflake documentation for details on viewing and working with event tables.