Skip to main content

PreCheck DataJob(Detailed)

Interface Overview

Verify task information in detail, including character sets, data permissions, and metadata.

Interface Address

/cloudcanal/console/api/v1/openapi/datajob/precheckdetail

Request Manner

POST

Request Parameters

ParameterNameParameter DescriptionRequestTypeWhether RequiredDataType
clusterIdThe ID of the cluster that the data source is linked toBodyTrueLong
srcDsIdThe ID of the source data sourceBodyTrueLong
srcHostTypeThe host type of the source data source

PRIVATE
PUBLIC
BodyTrueString
srcSchemaDescription of the source database and table, see Data Source Schema DescriptionBodyTrueString
dstDsIdThe ID of the target data sourceBodyTrueLong
dstHostTypeThe host type of the target data source

PRIVATE
PUBLIC
BodyTrueString
dstSchemaDescription of the target database and table, can be calculated from srcSchema with mappingDef, can be emptyBodyFalseString
mappingDefDatabase table mapping, see Mapping Rule DescriptionBodyTrueString
jobTypeThe type of the task, can be obtained by querying through Get Task TypeBodyTrueString
initialSyncFor data synchronization tasks, whether to initialize data (full migration)BodyFalseBoolean
shortTermNumIf there is short-term synchronization, how many days it lastsBodyFalseInteger
shortTermSyncWhether to perform short-term synchronization for data migration tasksBodyFalseBoolean
specIdSpecification IDBodyTrueInteger
fullPeriodWhether it is periodic full migrationBodyFalseBoolean
fullPeriodCronExprCronTab expression for periodic full migrationBodyFalseString
autoStartWhether to start automaticallyBodyFalseBoolean
checkOnceWhether to perform a full data verification after catching up with incremental dataBodyFalseBoolean
checkPeriodWhether it is periodic verificationBodyFalseBoolean
checkPeriodCronExprCronTab expression for periodic verificationBodyFalseString

Public Response Results

ParameterNameParameter DescriptionNotNullType(Java)
code1: Success, 0: FailureTrueString
dataData returned (if any)FalseObject
msgError message (if any)FalseString
requestIdUnique identifier for the request and responseTrueString

Data Parameter Description

data is an array. Each item in the array represents a check item. Check item parameters are described as follows:

ParameterNameParameter DescriptionNotNullType(Java)
titleName of the test itemTrueLong
passRequirementCondition for passing the test itemTrueString
varNameName of the parameter (if any)FalseString
varRequireValuesRequired value(s) for the parameterFalseString
varActualValueActual value of the parameter (if any)FalseString
preCheckTypeType of pre-check

CONNECTIVITY (Connectivity)
VERSION (Version)
BINLOG_EXISTENCE (Binlog Existence)
PRIVILEGES (Privileges)
STRUCT_TABLE_STORAGE (Table Storage)
STRUCT_TABLE_PK (Primary Key)
STRUCT_TABLE_CHARSET (Table Character Set)
STRUCT_TABLE_COLLATION (Table Collation)
STRUCT_TABLE_FK (Foreign Key)
STRUCT_EXISTENCE (Existence of Database Table Columns)
VARIABLES (Database Parameters)
SPEC_SCHEDULE_SUPPORT (Capacity)
INCREMENT_BALANCE (Incremental License)
FULL_BALANCE (Full Migration Task License)
CHECK_BALANCE (Verification Task License)
STRUCT_BALANCE (Schema Migration License)
NAME_LENGTH (Metadata Name Length)
INDEX_COLUMN (Index Column)
COLUMN_TYPE (Column Type)
VERSION_COMPATIBILITY (Version Compatibility)
FalseString
successWhether the test item has passed pre-checkFalseString
checkedWhether the test item has been pre-checkedFalseInteger
contextDbNameThe database associated with the check (if applicable)FalseInteger
contextTableNameThe table associated with the check (if applicable)FalseString
contextColumnNameThe column associated with the check (if applicable)FalseString

Response Example

{
"requestId": "282a9033-2c26-11ec-9577-adaf6efb66da",
"code": "1",
"msg": "request success",
"data": [
{
"title": "Check the structure of the source-end database table",
"passRequirement": "The selected library table fields need to be in the database (except for the library table fields to be built)",
"varName": null,
"varRequireValues": null,
"varActualValue": null,
"preCheckType": "STRUCT_EXISTENCE",
"success": true,
"checked": true,
"contextDbName": null,
"contextTableName": null,
"contextColumnName": null
},
{
"title": "Source-end table character set check",
"passRequirement": "Only 'utf 8','utf 8 mb 4' character sets are supported",
"varName": null,
"varRequireValues": [
"utf8",
"utf8mb4"
],
"varActualValue": "utf8mb4",
"preCheckType": "STRUCT_TABLE_CHARSET",
"success": true,
"checked": true,
"contextDbName": "dingtax",
"contextTableName": "worker_stats",
"contextColumnName": null
},
{
"title": "Source-end foreign key check",
"passRequirement": "Cross-library foreign key constraints are not supported",
"varName": null,
"varRequireValues": null,
"varActualValue": null,
"preCheckType": "STRUCT_TABLE_FK",
"success": true,
"checked": true,
"contextDbName": "dingtax",
"contextTableName": "proc_table_ref",
"contextColumnName": null
},
{
"title": "Source table storage format check",
"passRequirement": "Only the 'Inno DB' format is supported",
"varName": null,
"varRequireValues": [
"InnoDB",
"XENGINE",
"MyISAM"
],
"varActualValue": "InnoDB",
"preCheckType": "STRUCT_TABLE_STORAGE",
"success": true,
"checked": true,
"contextDbName": "dingtax",
"contextTableName": "worker_stats",
"contextColumnName": null
},
{
"title": "binlog file existence check",
"passRequirement": "\"show master status\" The displayed binlog file needs to be in the database",
"varName": null,
"varRequireValues": null,
"varActualValue": null,
"preCheckType": "BINLOG_EXISTENCE",
"success": true,
"checked": true,
"contextDbName": null,
"contextTableName": null,
"contextColumnName": null
}
]
}