Skip to content

Shut down the app

Use this guide to take the RAI Native App offline when you no longer need it running. It explains when to stop the app and how to choose the right shutdown depth in SQL or through a Python client.

Shut down the app when:

  • You are done using the app.
  • You want to reduce ongoing costs while the app is idle.

There are three shutdown modes that achieve different levels of cost reduction by dropping different sets of resources. All modes suspend the app’s CDC service, delete all reasoners, and cancel in-progress jobs. The difference is whether the app service, app warehouse, and compute pools are only suspended or are dropped and recreated the next time you start the app.

Use the following table to choose a shutdown depth before you stop the app:

What to useWhen to use it
Stop and suspend managed resources
  • Shuts down the app and suspends the app service, app warehouse, and compute pools.
  • Delivers the smallest cost reduction of the three modes.
  • Provides the fastest restart of the three modes.
Stop, suspend, and remove SPCS service
  • Shuts down the app, removes the app service, and suspends the warehouse and compute pools.
  • Delivers more cost reduction than suspend-only mode, but less than removing all resources.
  • Restarts more slowly than suspend-only mode, but faster than removing all resources.
Stop and remove all managed resources
  • Shuts down the app and removes the app service, app warehouse, and compute pools.
  • Delivers the largest cost reduction of the three modes.
  • Provides the slowest restart of the three modes.

Choose this option when you want to stop the app but leave the app service, app warehouse, and compute pools in place as suspended resources. This is the lightest shutdown and the quickest option to reverse.

Call the relationalai.app.deactivate() procedure with no arguments:

CALL relationalai.app.deactivate();
Output
+------------------------------------------------+
| RelationalAI service deactivated successfully. |
+------------------------------------------------+

Choose this option when you want a deeper shutdown that removes the app service but preserves the app warehouse and compute pools as suspended resources. Use it when you want more teardown than the default mode without fully removing the app’s managed infrastructure.

Call the relationalai.app.deactivate() procedure with 'service' as the argument:

CALL relationalai.app.deactivate('service');
Output
+------------------------------------------------+
| RelationalAI service deactivated successfully. |
+------------------------------------------------+

Stop the app and drop all managed resources

Section titled “Stop the app and drop all managed resources”

Choose this option when you want the deepest shutdown and do not need to keep the app warehouse or compute pools available for the next start. Use it when cost reduction matters more than restart speed.

Call the relationalai.app.deactivate() procedure with 'all' as the argument:

CALL relationalai.app.deactivate('all');
Output
+------------------------------------------------+
| RelationalAI service deactivated successfully. |
+------------------------------------------------+