跳到主要内容

数据任务元数据

接口描述

查询已创建任务源端元数据,目标元数据,元数据映射

接口地址

/cloudcanal/console/api/v1/openapi/datajob/queryjobschemabyid

请求方式

POST

请求参数

参数名称参数说明请求类型是否必须数据类型
jobId任务idbodylong

公共响应结果

参数名称参数说明类型(java)不为空
code1:成功 0:失败string
dataobject
msgstring
requestIdstring

data 参数说明

参数名称参数说明不为空数据类型
sourceSchema源端元数据, 参考 库表列结构说明String
targetSchema默认为空字符串String
mappingConfig元数据映射, 参考 元数据映射说明String
defaultTopic如果是全库迁移,且对端为消息,则新增表数据默认投递的队列String
defaultTopicPartition默认队列分区数int
schemaWhiteListLevel白名单级别,如果为空,则默认完全白名单模式(列变更操作除外),目前支持 DB 级别和不设任何值
NONE
DB
SCHEMA
TABLE
String
srcSchemaLessFormat如果源为消息(Kafka/RocketMQ)或缓存(Redis), 指定数据的格式

CLOUDCANAL_JSON_FOR_MQ
CANAL_JSON_FOR_MQ
VALUE_JSON_FOR_CACHE
VALUE_COL_CAMEL_CASE_JSON_FOR_CACHE
String
dstSchemaLessFormat如果目标为消息(Kafka/RocketMQ)或缓存(Redis), 指定数据的格式

CLOUDCANAL_JSON_FOR_MQ
CANAL_JSON_FOR_MQ
VALUE_JSON_FOR_CACHE
VALUE_COL_CAMEL_CASE_JSON_FOR_CACHE
String

响应示例

{
"requestId": "ea812377-2cbf-11ec-a410-b73acd35bc17",
"code": "1",
"msg": "request success",
"data": {
"sourceSchema": "[{\"db\":\"dingtax\",\"dbPattern\":\"\",\"tables\":[{\"table\":\"kbs_question\",\"tablePattern\":\"\",\"columns\":[{\"column\":\"ID\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"QUESTION\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"GRADE\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"CATEGORY\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"CATEGORY_ID\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"PRIMARY_KEYWORD\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"ALTERNATE_KEYWORD\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"SEARCH_KEYWORD\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"KEYWORD_OPTION\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"SYNONYMS\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"ANSWER_SHAPE\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"PERSPECTIVE_ID\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"ANSWER\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"ANSWER_MD5\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"VOICE_ANSWER\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"SHOW_ANSWER\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"REMARK\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"STATUS\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"VALID_DATE\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"INVALID_DATE\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"INVALID_REASON\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"ADD_MODE\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"ORIGINAL\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"APPROVAL_STATUS\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"MAP_SOURCE\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"MAP_ID\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"VOICE_URL\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"SYNC_FLAG\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"SYNC_TIME\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"BIZ_CATEGORY_ID\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"FILE_CODE\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"REFERENCE\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"SUGGESTION\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"BRIGHTNESS\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"OPEN_FLAG\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"RELATION_STATUS\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"CREATOR\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"CREATION_DATE\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"MODIFIER\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"MODIFICATION_DATE\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"QUESTION_TYPE\",\"targetAutoCreate\":false,\"inBlackList\":false}],\"actions\":[\"INSERT\",\"UPDATE\",\"DELETE\"],\"inBlackList\":false,\"targetAutoCreate\":false,\"specifiedPks\":[]},{\"table\":\"worker_stats\",\"tablePattern\":\"\",\"columns\":[{\"column\":\"id\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"gmt_create\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"worker_id\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"cpu_stat\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"mem_stat\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"disk_stat\",\"targetAutoCreate\":false,\"inBlackList\":false},{\"column\":\"col_new\",\"targetAutoCreate\":false,\"inBlackList\":false}],\"actions\":[\"INSERT\",\"UPDATE\",\"DELETE\"],\"inBlackList\":false,\"targetAutoCreate\":false,\"specifiedPks\":[]}],\"targetAutoCreate\":false,\"inBlackList\":false}]",
"targetSchema": "",
"mappingConfig": "[{\"method\":\"DB_DB\",\"serializeMapping\":{\"{\\\"value\\\":\\\"dingtax\\\"}\":\"{\\\"value\\\":\\\"dingtax_re\\\"}\"},\"serializeAutoGenRules\":{},\"commonGenRule\":\"MIRROR\"},{\"serializeMapping\":{},\"method\":\"TABLE_TABLE\",\"serializeAutoGenRules\":{},\"commonGenRule\":\"MIRROR\"},{\"method\":\"COLUMN_COLUMN\",\"serializeMapping\":{},\"serializeAutoGenRules\":{},\"commonGenRule\":\"MIRROR\"}]",
"defaultTopic": null,
"defaultTopicPartition": 0,
"schemaWhiteListLevel": null,
"srcSchemaLessFormat": null,
"dstSchemaLessFormat": null
}
}