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.
Parameters
Section titled “Parameters”Name | Type | Description |
---|---|---|
name | STRING | The name of the engine to delete (case-sensitive). |
force_delete | BOOLEAN | Set to TRUE to delete the CDC engine. (Default: FALSE ) |
Returns
Section titled “Returns”A table with the following columns:
Column | Type | Description |
---|---|---|
NAME | STRING | The name of the deleted engine. |
MESSAGE | STRING | A message indicating the success or failure of the deletion. |
Example
Section titled “Example”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.