Note
This view is available starting with V4.6.2.1.
Overview
Displays information about the current AI batch tasks of the tenant. It is commonly used to monitor the progress of batch embeddings during index creation in batch file mode.
This view converts the internal numerical status into a string 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 DBA_OB_AI_BATCH_TASK_HISTORY table after approximately 10 minutes and are cleared from this view. For long-term tracking, please query the historical view DBA_OB_AI_BATCH_TASK_HISTORY in a timely manner.
Columns
Column |
Type |
Is NULL |
Description |
|---|---|---|---|
| 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 index creation in the batch file. CREATE VECTOR INDEX The triggered DDL task. |
| 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 so far and the total number of rows to be processed. REQUESTS_HANDLED / TOTAL_REQUESTS Calculate. |
| 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: {"message": "", "ob_error_code": 0, "model_http_code": 0}, indicating no error. |
Sample query
Query the progress of batch tasks for a specified model within the current tenant:
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_OB_AI_BATCH_TASKS;
Response example:
+-------------------------------------+-------------+-------------------+--------------+---------+------------------+----------------+------------------+----------------------------+----------------------------+------------------------+--------------------------------------------------+-----------------------------------------------------------+
| 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 |
+-------------------------------------+-------------+-------------------+--------------+---------+------------------+----------------+------------------+----------------------------+----------------------------+------------------------+--------------------------------------------------+-----------------------------------------------------------+
| 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} |
| 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