drop_service() Deprecated #
#drop_service()
This procedure has been deprecated. Use the deactivate()
procedure instead.
Stops the RelationalAI (RAI) container service running on Snowpark Container Services and drops the service’s Snowflake warehouse and compute pool. Engine compute pools and existing RAI engines remain intact.
Requires the app_admin
application role.
Example#
You can drop the service to reduce costs when you are not using the RAI Native App. To suspend CDC, delete all engines, and drop the service:
#-- 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();
If you need to use the service again, 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.