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#

NameTypeDescription
drop_resourceSTRINGOptional string that specifies which RAI Native App resources to drop while deactivating the app. May be one of:
  • NULL (default) - Do not drop any resources.
  • 'all' - Delete all resources.
  • 'warehouse' - Drop the app’s warehouse.
  • 'compute_pool' - Drop the app’s compute pools.
  • 'relational_ai_service' - Drop the app’s SPCS service.

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:

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.

See Also#