Note
This view is available starting with V4.6.2.1.
Overview
Displays the information about all ongoing AI batch tasks in the cluster. It is commonly used under the sys tenant to monitor the batch embedding progress during index creation in batch file mode for each tenant.
This view converts the internal numerical status into strings and calculates the progress percentage based on the number of processed requests compared to the total number of requests. Completed or failed tasks are archived to the CDB_OB_AI_BATCH_TASK_HISTORY table after approximately 10 minutes and are removed from this view.
Columns
Column |
Type |
Is NULL |
Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | Tenant ID. |
| TASK_ID | varchar(256) | NO | Unique identifier of the AI batch task. |
| DDL_TASK_ID | bigint(20) | YES | Associated DDL task ID. Corresponding to the batch file used for index creation. CREATE VECTOR INDEX The DDL task that was triggered. |
| MODEL_NAME | varchar(256) | NO | The name of the AI model used, corresponding to DBMS_AI_SERVICE The name of the model registered in the model registry. |
| COMMAND_TYPE | varchar(256) | NO | AI call type, for example, EMBED. |
| STATUS | varchar(256) | NO | Task status. Valid values: INVALID, PENDING, RUNNING, FINISHED, FAILED, CANCELLED, UNKNOWN. |
| REQUESTS_HANDLED | bigint(20) | NO | Number of requests processed. |
| TOTAL_REQUESTS | bigint(20) | NO | Total Requests. |
| PROGRESS_PERCENT | decimal | YES | Task progress percentage, calculated based on the number of rows processed REQUESTS_HANDLED / TOTAL_REQUESTS Calculation. |
| TASK_CREATE_TIME | timestamp | NO | Task creation time. |
| TASK_UPDATE_TIME | timestamp | NO | The last time the task status was updated. |
| BATCH_ID | varchar(256) | YES | The batch task ID on the AI service provider side, used for polling task status or canceling the task. |
| REMOTE_FILE_IDS | varchar(2048) | YES | File ID on the AI service provider side, in JSON format. Example in OpenAI style: {"input_file_id":"file-in-xxx","output_file_id":"file-out-xxx","error_file_id":"file-err-xxx"}; Anthropic style example: {"output_file_id":"msgbatch_yyy_result"}. |
| ERROR_DETAIL | varchar(4096) | YES | Error messages of OceanBase AI Database and the model. The value is a JSON string. Example: {"ob_error_code":0,"model_http_code":429,"message":"Rate limit exceeded for requests"}. This parameter is usually empty or when the task succeeds. ob_error_code is 0. |
Sample query
Query the progress of batch tasks for each tenant in the cluster from the sys tenant:
obclient [oceanbase]> SELECT * FROM oceanbase.CDB_OB_AI_BATCH_TASKS;
Response example:
+-------------------------------------+-------------+-------------------+--------------+---------+------------------+----------------+------------------+----------------------------+----------------------------+------------------------+--------------------------------------------------+-----------------------------------------------------------+
TENANT_ID | TASK_ID | DDL_TASK_ID | MODEL_NAME | COMMAND_TYPE | STATUS | REQUESTS_HANDLED | TOTAL_REQUESTS | PROGRESS_PERCENT | TASK_CREATE_TIME | TASK_UPDATE_TIME | BATCH_ID | REMOTE_FILE_IDS | ERROR_DETAIL |
+-------------------------------------+-------------+-------------------+--------------+---------+------------------+----------------+------------------+----------------------------+----------------------------+------------------------+--------------------------------------------------+-----------------------------------------------------------+
1004 | ai_1002_1780641797310516_1543562579 | 106 | ob_embed_endpoint | EMBED | RUNNING | 0 | 1 | 0.00 | 2026-06-05 14:43:17.310525 | 2026-06-05 14:43:19.262477 | batch_38268a491ed64a90 | {"input_file_id": "file-batch-292094790baf42d8"} | {"message": "", "ob_error_code": 0, "model_http_code": 0} |
1005 | ai_1002_1780641797312074_150571907 | 106 | ob_embed_endpoint | EMBED | RUNNING | 0 | 1 | 0.00 | 2026-06-05 14:43:17.312081 | 2026-06-05 14:43:17.361702 | batch_2291cf5289bf412d | {"input_file_id": "file-batch-651f39b2c3314897"} | {"message": "", "ob_error_code": 0, "model_http_code": 0} |
+-------------------------------------+-------------+-------------------+--------------+---------+------------------+----------------+------------------+----------------------------+----------------------------+------------------------+--------------------------------------------------+-----------------------------------------------------------+
2 rows in set