cdc_status()#
relationalai.app
#cdc_status()
Retrieves the current status of Change Data Capture (CDC) for the RelationalAI (RAI) Native App on Snowflake.
Provides information on whether CDC is enabled, suspended, or stopped.
Requires the cdc_admin
application role.
Returns#
The cdc_status()
procedure returns a single row with the following columns:
Column | Type | Description |
---|---|---|
CDC_ENABLED | BOOLEAN | Whether CDC is enabled. |
CDC_ENGINE_NAME | STRING | The name of the current CDC engine. |
CDC_ENGINE_STATUS | STRING | The status of the CDC engine, which may be READY or SUSPENDED . |
CDC_ENGINE_SIZE | STRING | The configured size of the CDC engine. |
CDC_TASK_STATUS | STRING | The status of the CDC service, which may be started or suspended . |
CDC_TASK_INFO | VARIANT | A JSON object with four fields: createdOn , lastSuspendedOn , lastSuspendedReason , and state . |
If CDC is disabled, the CDC_ENGINE_NAME
column is null
.
Use resume_cdc()
to enable CDC.
Example#
Use cdc_status()
to check the current status of CDC for the RAI Native App:
#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 | {"createdOn": "2024-10-15 21:58:11.291 -0700", "lastSuspendedOn": null, "lastSuspendedReason": null, "state": "started"} |
+--------------+--------------------+-------------------+------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------| */