Note
This view is available starting with V4.2.1.
Purpose
This view displays the history of table-level cross-tenant import tasks.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | The ID of the tenant to which the task belongs. |
| TASK_ID | varchar(4096) | NO | The ID of the load balancing task. |
| JOB_ID | bigint(20) | NO | The task ID. |
| SRC_TENANT_ID | bigint(20) | NO | The ID of the source tenant. |
| SRC_TABLESPACE | varchar(128) | YES | The TABLESPACE of the source table. |
| SRC_TABLEGROUP | varchar(128) | YES | The TABLEGROUP of the source table. |
| SRC_DATABASE | varchar(128) | YES | The DATABASE of the source table. |
| SRC_TABLE | varchar(128) | YES | The name of the source table. |
| SRC_PARTITION | varchar(64) | YES | The name of the partition of the source table. |
| TARGET_TABLESPACE | varchar(128) | YES | The name of the remapped tablespace. If no remapping is performed, this column is left empty. |
| TARGET_TABLEGROUP | varchar(128) | YES | The name of the remapped tablegroup. If no remapping is performed, this column is left empty. |
| TARGET_DATABASE | varchar(128) | YES | The name of the remapped database. If no remapping is performed, this column is left empty. |
| TARGET_TABLE | varchar(128) | YES | The name of the target table. |
| TABLE_COLUMN | bigint(20) | NO | The number of columns in the table. |
| STATUS | varchar(64) | NO | The end status of the import task: FINISH. |
| START_TIMESTAMP | timestamp(6) | NO | The current time of the tenant when the task started. |
| COMPLETION_TIMESTAMP | timestamp(6) | NO | The current time of the tenant when the task completed. |
| CUMULATIVE_TS | bigint(20) | NO | The cumulative time. |
| TOTAL_INDEX_COUNT | bigint(20) | NO | The total number of indexes. |
| IMPORTED_INDEX_COUNT | bigint(20) | NO | The number of indexes that have been imported. |
| FAILED_INDEX_COUNT | bigint(20) | NO | The number of indexes that failed to be imported. |
| TOTAL_CONSTRAINT_COUNT | bigint(20) | NO | The total number of constraints. |
| IMPORTED_CONSTRAINT_COUNT | bigint(20) | NO | The number of constraints that have been imported. |
| FAILED_CONSTRAINT_COUNT | bigint(20) | NO | The number of constraints that failed to be imported. |
| TOTAL_REF_CONSTRAINT_COUNT | bigint(20) | NO | The total number of reference constraints. |
| IMPORTED_REF_CONSTRAINT_COUNT | bigint(20) | NO | The number of reference constraints that have been imported. |
| FAILED_REF_CONSTRAINT_COUNT | bigint(20) | NO | The number of reference constraints that failed to be imported. |
| RESULT | varchar(64) | YES | The result of the table-level restore task:
|
| COMMENT | longtext | YES | Remarks. |
Sample query
After a table-level restore task is completed, the sys tenant queries the history of the import task for each table.
obclient [oceanbase]> SELECT * FROM oceanbase.CDB_OB_IMPORT_TABLE_TASK_HISTORY\G
The query result is as follows:
*************************** 1. row ***************************
TENANT_ID: 1002
TASK_ID: 247439
JOB_ID: 6
SRC_TENANT_ID: 1008
SRC_TABLESPACE: NULL
SRC_TABLEGROUP: NULL
SRC_DATABASE: infotest
SRC_TABLE: t2
SRC_PARTITION: NULL
TARGET_TABLESPACE: NULL
TARGET_TABLEGROUP: NULL
TARGET_DATABASE: infotest
TARGET_TABLE: newtb2
TABLE_COLUMN: 3
STATUS: FINISH
START_TIMESTAMP: 2025-01-07 16:11:33.111473
COMPLETION_TIMESTAMP: 2025-01-07 16:12:33.297206
CUMULATIVE_TS: -1
TOTAL_INDEX_COUNT: 0
IMPORTED_INDEX_COUNT: 0
FAILED_INDEX_COUNT: 0
TOTAL_CONSTRAINT_COUNT: 0
IMPORTED_CONSTRAINT_COUNT: 0
FAILED_CONSTRAINT_COUNT: 0
TOTAL_REF_CONSTRAINT_COUNT: 0
IMPORTED_REF_CONSTRAINT_COUNT: 0
FAILED_REF_CONSTRAINT_COUNT: 0
RESULT: SUCCESS
COMMENT:
1 row in set