BladePipe 1.6.0 supports Snowflake, Hologres and CloudBerry.
Skip to main content

Query DataJob Position

Interface Overview

Query the position information of a task by task ID. Currently only supports CHECK (verification) type tasks, returning table-level verification results.

Interface Address

/cloudcanal/console/api/v1/openapi/datajob/queryjobposition

Request Manner

POST

Request Parameters

ParameterNameParameter DescriptionRequestTypeWhether RequiredDataType
jobIdDataJob IDbodyTruelong
dataJobTypeTask type. Currently only supports CHECK. See Get Task Type ListbodyTruestring

Public Response Results

ParameterNameParameter DescriptionType(Java)NotNull
code1: Success, 0: FailurestringTrue
dataobjectFalse
msgstringFalse
requestIdstringTrue

Data Parameter Description

ParameterNameParameter DescriptionNotNullType(Java)
tableCheckResultMapTable verification result map. Key is the JSON-serialized string of TableUnit; value is a verification position object.Falsemap

TableUnit (Map Key) Description

The map key is the JSON-serialized string of a TableUnit object, for example: {"dbName":"test_db","tableSchema":"public","tableName":"table1"}

ParameterNameParameter DescriptionNotNullType(Java)
dbNameDatabase nameFalsestring
tableSchemaSchema nameFalsestring
tableNameTable nameTruestring

RdbCheckPositionDTO (Map Value) Description

Verification position object containing table-level verification progress and result information.

Basic Information

ParameterNameParameter DescriptionNotNullType(Java)
taskIdTask IDFalsestring
jobIdJob IDFalsestring
taskNameTask nameFalsestring
dbNameDatabase nameFalsestring
schemaSchema nameFalsestring
tableNameTable nameFalsestring

Progress Information

ParameterNameParameter DescriptionNotNullType(Java)
handledRecordCountNumber of processed recordsTruelong
maxCountMaximum number of recordsTruelong
percentageProgress percentage (0-100)Falsedecimal
elapsedTimeMsElapsed time (milliseconds)Truelong
finishedWhether the table verification is completeTrueboolean

Primary Key Information

ParameterNameParameter DescriptionNotNullType(Java)
currentPkCurrent primary key value being processedFalsestring
minPkNumericMinimum primary key value (numeric)Falsedecimal
maxPkNumericMaximum primary key value (numeric)Falsedecimal

Verification Results

ParameterNameParameter DescriptionNotNullType(Java)
lossNumber of records missing on the target (present in source but not in target)Falselong
diffNumber of records inconsistent with target (present on both sides but with different content)Falselong
checkStageVerification stageFalsestring

Other Fields

ParameterNameParameter DescriptionNotNullType(Java)
fileBlockIndexFile block indexTruelong
includedWhether the first record is includedTrueboolean

Response Example

{
"code": "1",
"msg": "request success",
"data": {
"tableCheckResultMap": {
"{\"tableName\":\"worker_stats\",\"tableSchema\":\"dingtax\"}": {
"taskId": "622",
"jobId": "266",
"taskName": "canalsubnt1b4uqw_CHECK",
"dbName": null,
"schema": "dingtax",
"tableName": "worker_stats",
"handledRecordCount": 36352,
"maxCount": 157458,
"percentage": 23.09,
"elapsedTimeMs": 22624,
"included": true,
"finished": false,
"loss": 0,
"diff": 0,
"checkStage": "INITIAL_CHECK"
}
}
},
"requestId": "5d589cc0-ce71-11f0-8388-cf86e7c30fd4"
}

Notes

  • This API currently only supports dataJobType = CHECK (verification tasks).
  • Calling this API for other task types will return an error.
  • loss indicates records present in the source but missing on the target.
  • diff indicates records present on both sides but with inconsistent data content.
  • When finished is true and both loss and diff are 0, the table verification has passed.