Skip to content

relationalai.api.delete_engine()

delete_engine(
name STRING
force_delete BOOLEAN DEFAULT FALSE
)

A procedure that deletes the specified RelationalAI (RAI) engine. When an engine is deleted, all of its transaction are cancelled. The CDC engine cannot be deleted unless force_delete is set to TRUE. Requires the eng_admin application role.

NameTypeDescription
nameSTRINGThe name of the engine to delete (case-sensitive).
force_deleteBOOLEANSet to TRUE to delete the CDC engine. (Default: FALSE)

A table with the following columns:

ColumnTypeDescription
NAMESTRINGThe name of the deleted engine.
MESSAGESTRINGA message indicating the success or failure of the deletion.

Use the api.delete_engine() procedure to delete an engine:

-- Delete the engine named 'my_engine'.
CALL relationalai.api.delete_engine('my_engine');
/*+-----------+----------------------+
| NAME | MESSAGE |
|-----------+----------------------|
| my_engine | deleted successfully |
+-----------+----------------------+ */

The CDC engine may only be deleted if the force_delete parameter is set to TRUE:

-- Force delete the CDC engine.
CALL relationalai.api.delete_engine('CDC_MANAGED_ENGINE', TRUE);
/*+---------------------+----------------------+
| NAME | MESSAGE |
|---------------------+----------------------|
| CDC_MANAGED_ENGINE | deleted successfully |
+---------------------+----------------------+ */

Note that if CDC is enabled, the CDC engine will be recreated automatically whenever updates to a stream are detected. See Data Management for more information on the CDC engine.