deactivate()#
relationalai.app
#deactivate(drop_resource STRING DEFAULT NULL)
A procedure that deactivates the RelationalAI (RAI) Native App.
Python users cannot create or query models using the RAI Python API while the app is deactivated.
Requires the app_admin
application role.
Parameters#
Name | Type | Description |
---|---|---|
drop_resource | STRING | Optional string that specifies which RAI Native App resources to drop while deactivating the app. May be one of:
|
Returns#
STRING
Example#
Use the app.deactivate()
procedure to deactivate the RAI Native App and reduce costs when you are not using it:
#CALL relationalai.app.deactivate();
/*+------------------------------------------------+
| RelationalAI service deactivated successfully. |
+------------------------------------------------+ */
When you deactivate the app:
- The CDC service is suspended.
- All currently running queries are terminated.
- All existing RAI engines are deleted.
By default, the RAI Native App’s warehouse, compute pools, and SPCS service are not dropped when the app is deactivated.
To drop one or all of these resources, specify the drop_resource
parameter:
#-- Drop all resources when deactivating the app.
CALL relationalai.app.deactivate('all');
-- Drop only the app warehouse when deactivating the app.
CALL relationalai.app.deactivate('warehouse');
See App Management for more information on activating and deactivating the RAI Native App.