Note
This view is available starting with V4.2.1.
Purpose
This view displays information about import tasks at the tenant level.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | The ID of the tenant to which the task belongs. |
| JOB_ID | bigint(20) | NO | The ID of the task. |
| INITIATOR_TENANT_ID | bigint(20) | NO | The ID of the tenant to which the parent task belongs. |
| INITIATOR_JOB_ID | bigint(20) | NO | The ID of the parent task. |
| START_TIMESTAMP | timestamp(6) | NO | The current time of the tenant when the task starts. |
| FINISH_TIMESTAMP | timestamp(6) | NO | The current time of the tenant when the task finishes. |
| SRC_TENANT_NAME | varchar(64) | NO | The name of the source tenant. |
| SRC_TENANT_ID | bigint(20) | NO | The ID of the source tenant. |
| STATUS | varchar(64) | NO | The status of the task. Valid values:
|
| IMPORT_ALL | tinyint(4) | NO | Indicates whether to import all tables in the tenant. This value is 1 only when the RECOVER TABLE *.* clause is specified. Otherwise, this value is 0. |
| DB_LIST | longtext | YES | The list of databases to be fully recovered. |
| TABLE_LIST | longtext | YES | The list of tables to be recovered. |
| REMAP_DB_LIST | longtext | YES | The list of databases to be renamed. The format is as follows: db1:new_db1, db2:newdb2. |
| REMAP_TABLE_LIST | longtext | YES | The list of tables to be renamed. The format is as follows: db1.t1:new_t1, db1.t2:db2.new_t2. |
| REMAP_TABLEGROUP_LIST | longtext | YES | The list of table groups to be remapped. You can remap tables from the original table group to the target table group. The format is as follows: tg1:new_tg1, tg2:new_tg2. |
| REMAP_TABLESPACE_LIST | longtext | YES | The list of tablespaces to be remapped. You can remap tables from the original tablespace to the target tablespace. The format is as follows: ts1:new_ts1, ts2:new_ts2. |
| TOTAL_TABLE_COUNT | bigint(20) | NO | The total number of tables to be imported. |
| FINISHED_TABLE_COUNT | bigint(20) | NO | The number of tables that have been imported. |
| FAILED_TABLE_COUNT | bigint(20) | NO | The number of tables that failed to be imported. |
| RESULT | varchar(64) | YES | The result of the table-level restore task. Valid values:
|
| COMMENT | longtext | YES | The remarks. |
| DESCRIPTION | longtext | YES | The DESCRIPTION value specified in the restore command. |
Sample query
In the process of table restore, the sys tenant queries the information about import tasks of the target tenant.
obclient [oceanbase]> SELECT * FROM oceanbase.CDB_OB_IMPORT_TABLE_JOBS\G
The query result is as follows:
*************************** 1. row ***************************
TENANT_ID: 1002
JOB_ID: 6
INITIATOR_TENANT_ID: 1002
INITIATOR_JOB_ID: 5
START_TIMESTAMP: 2025-01-07 16:11:32.874841
SRC_TENANT_NAME: AUX_RECOVER$1736237253959061
SRC_TENANT_ID: 1008
STATUS: IMPORT_TABLE
IMPORT_ALL: 0
DB_LIST:
TABLE_LIST: `infotest`.`t2`
REMAP_DB_LIST:
REMAP_TABLE_LIST: `infotest`.`t2`:`infotest`.`newtb2`
REMAP_TABLEGROUP_LIST:
REMAP_TABLESPACE_LIST:
TOTAL_TABLE_COUNT: 0
FINISHED_TABLE_COUNT: 0
FAILED_TABLE_COUNT: 0
RESULT:
COMMENT:
DESCRIPTION: NULL
1 row in set