deactivate() Updated #
#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:
|
As of version 2025.3.25-94a100b-1
, the drop_resource
parameter no longer accepts the 'warehouse'
and 'compute_pool'
values.
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 suspended.
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 RAI service when deactivating the app.
CALL relationalai.app.deactivate('service');
See App Management for more information on activating and deactivating the RAI Native App. Details on the resources used by the app are can be found in the Compute Resources guide.