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_ENGINE_NAME | STRING | The name of the current 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 setup_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_ENGINE_NAME | CDC_TASK_STATUS | CDC_TASK_INFO |
|-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------|
| MY_CDC_ENGINE | started | {"createdOn": "2024-05-31 07:38:03.765 -0700", "lastSuspendedOn": null, "lastSuspendedReason": null, "state": "started"} |
+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------| */