Skip to content

cdc_status()

relationalai.app
cdc_status()

A procedure that retrieves the current status and other details of the CDC Service. Requires the app_user application role.

None.

A table with the following columns:

ColumnTypeDescription
CDC_ENABLEDBOOLEANWhether the CDC service is enabled.
CDC_ENGINE_NAMESTRINGThe name of the current CDC engine. NULL if CDC is disabled.
CDC_ENGINE_STATUSSTRINGThe current status of the CDC engine. See CDC engine statuses. NULL if CDC is disabled.
CDC_ENGINE_SIZESTRINGThe configured size of the CDC engine.
CDC_TASK_STATUSSTRINGThe status of the CDC service. May be one of:
  • started
  • suspended
CDC_TASK_INFOVARIANTA JSON object with four fields: status, created_on, last_suspended_on, and last_suspension_reason.
StatusDescription
READYThe CDC engine is running and ready to process changes.
PENDINGThe CDC engine is not ready yet. It might be starting, resuming, provisioning an endpoint, or finishing its configuration. Wait and call app.cdc_status() again. If the status remains in PENDING for an extended period of time, wait for any active CDC_MANAGED_ENGINE transactions in api.transactions to finish, then run CALL relationalai.api.delete_engine('CDC_MANAGED_ENGINE', TRUE); to force deletion of the engine. RAI creates a replacement engine when there are new changes to process.
SUSPENDINGThe CDC engine is becoming idle. Wait and call app.cdc_status() again.
SUSPENDEDThe CDC engine is idle. No action is required; it resumes automatically when there are changes to process.
UPGRADINGThe CDC engine is being upgraded. Wait and call app.cdc_status() again.
DELETINGThe CDC engine is being deleted. Wait for deletion to finish. RAI creates a new CDC engine when there are changes to process.
FAILEDThe CDC engine’s service failed. RAI attempts to delete and recreate it when there are changes to process. If the status does not recover, wait for active CDC_MANAGED_ENGINE transactions in api.transactions to finish. With the eng_admin application role, call CALL relationalai.api.delete_engine('CDC_MANAGED_ENGINE', TRUE);. RAI creates a replacement when there are new changes to process.
GONEThe CDC engine’s service no longer exists, but its metadata remains. RAI attempts to remove the stale metadata and recreate the engine when there are changes to process. If the status does not recover, wait for active CDC_MANAGED_ENGINE transactions in api.transactions to finish. With the eng_admin application role, call CALL relationalai.api.delete_engine('CDC_MANAGED_ENGINE', TRUE);. RAI creates a replacement when there are new changes to process.

Use app.cdc_status() to check the current status of the RAI Native App’s CDC Service:

CALL relationalai.app.cdc_status();
/*+--------------+--------------------+-------------------+------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------|
| CDC_ENABLED | CDC_ENGINE_NAME | CDC_ENGINE_STATUS | CDC_ENGINE_SIZE | CDC_TASK_STATUS | CDC_TASK_INFO |
|--------------+--------------------+-------------------+------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------|
| TRUE | CDC_MANAGED_ENGINE | READY | HIGHMEM_X64_S | started | {"status": "started", "created_on": "2024-10-15 21:58:11.291 -0700", "last_suspended_on": null, "last_suspension_reason": null} |
+--------------+--------------------+-------------------+------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------| */

See Enable and disable CDC for more information on the CDC service.