本接口用于查询数据迁移或数据同步项目的项目详情。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
当前API暂无授权信息透出。
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
Id | string | 是 | 数据迁移或数据同步项目的 ID。 | np_fe**** |
返回参数
StepInfo 数据结构
不同步骤的 StepInfo
参数返回不同的字段。
-
TRANSFER_APP_SWITCH(正向切换)
参数 类型 描述 checkpointSampleTimestamp long 位点采集时间。格式为 Unix timestamp,单位为秒。 -
INCR_TRANSFER(增量同步)
参数 类型 描述 incrTimestampCheckpoint long 位点时间。格式为 Unix timestamp,单位为秒。 checkpointSampleTimestamp long 位点采集时间。格式为 Unix timestamp,单位为秒。 enableIncrStatistics boolean 是否开启 DML/DDL 统计。 -
FULL_VERIFIER(全量校验)和 FULL_TRANSFER(全量迁移)
参数 类型 描述 processedRecords long 已完成迁移行数/实际行数。 capacity long 预估总行数。 srcRps long 源端读取 RPS,单位为记录数/秒。 srcRt string 源端读取 RT,单位为毫秒/条。 srcIops long 源端读取流量,单位为字节数/秒。 dstRps long 目标端读取/写入 RPS,单位为记录数/秒。 dstRt long 目标端读取/写入 RT,单位为毫秒/条。 dstIops long 目标端读取/写入流量,单位为字节数/秒。 srcRpsRef long 源端读取 RPS 的基准值。 dstRpsRef long 目标端读取/写入 RPS 的基准值。 dstRtRef long 目标端读取/写入 RT 基准值。
附录
Kafka
{
"connExtraAttributes":{
"endpoint":"xxx.xxx.xxx.1:2883",
"username":null,
"enableSSL":null,
"enableSASL":null,
"saslMechanism":null,
"disableIdentificationAlgorithm":false
}
}
参数 | 类型 | 描述 |
---|---|---|
endpoint | string | 服务地址。 |
username | string | 用户名。当您选择认证方式为 PLAIN、SCRAM-SHA-256 和 SCRAM-SHA-512 时,该参数必填。 |
enableSSL | boolean | 是否开启 SSL 认证。如果开启,则需要上传授信证书。 |
enableSASL | boolean | 是否开启 SASL 认证。 |
saslMechanism | KafkaSaslMechanisnEnum | 加密方式,包括 PLAIN、SCRAM-SHA-256、SCRAM-SHA-512 和 KERBEROS。 |
disableIdentificationAlgorithm | boolean | SSL 加密时,是否开启主机名验证。 |
DataHub
{
"connExtraAttributes":{
"endpoint":"xxx.xxx.xxx.1:2883",
"project":"detx***"
}
}
参数 | 类型 | 描述 |
---|---|---|
endpoint | string | 服务地址。 |
project | string | 项目的名称。 |
RocketMQ
{
"connExtraAttributes":{
"endpoint":"xxx.xxx.xxx.1:2883",
"endpointType":null,
"version":null
}
}
参数 | 类型 | 描述 |
---|---|---|
endpoint | string | 服务地址。 |
endpointType | CloudRocketMQEndpoint.Type | 服务地址的类型。 |
version | CloudRocketMQInst.Version | RocketMQ 的版本。 |
OceanBase
{
"connExtraAttributes":{
"cluster":"xgez***",
"tenant":"gexr**",
"isLogicSource":false,
"useLogProxy":true,
"drcUser":"tes***",
"configUrl":"http://xxx.xxx.xxx.1:2883/service****",
"logProxyIp":"xxx.xxx.xxx.2",
"logProxyPort":2883,
"noUserAuth":false
}
}
参数 | 类型 | 描述 |
---|---|---|
cluster | string | 集群的名称。 |
tenant | string | 租户的名称。 |
isLogicSource | boolean | 是否为逻辑数据源。 |
useLogProxy | boolean | 是否使用 LogProxy。 |
drcUser | string | drc_user 的配置。 |
configUrl | string | 用于获取 OceanBase 数据库底层服务器的真实地址。 |
logProxyIp | string | LogProxy 服务的 IP 地址。 |
logProxyPort | integer | LogProxy 服务的端口。 |
noUserAuth | boolean | 对于同步 DataWorks 的接口,数据源是 OMS 自动生成的。如果没有用户账号和密码,则不能连接用户的 OceanBase 数据库。 |
TiDB
{
"connExtraAttributes":{
"kafkaId":"e_edz****",
"kafkaTopic":"test**",
"kafkaName":"denz***"
}
}
参数 | 类型 | 描述 |
---|---|---|
kafkaId | string | 绑定的 Kafka 数据源的 ID。 |
kafkaTopic | string | 绑定的 Kafka Topic 的名称。 |
kafkaName | string | 绑定的 Kafka 数据源的名称。 |
示例
正常返回示例
JSON
格式
{
"Success": true,
"ErrorDetail": {
"Code": "CM-RESOAT1111\n",
"Level": "ERROR",
"Message": "A system error occurred.\n",
"ExtraContext": {
"key": "null"
},
"MessageMcmsKey": "null",
"MessageMcmsContext": {
"key": "null"
},
"Reason": "null",
"ReasonMcmsKey": "null",
"ReasonMcmsContext": {
"key": "null"
},
"Proposal": "null",
"ProposalMcmsKey": "null",
"ProposalMcmsContext": {
"key": "null"
},
"UpstreamErrorDetail": "null"
},
"Code": "INNER_ERROR",
"Message": "A system error occurred.\n",
"Advice": "Contact the administrator. ",
"RequestId": "473469C7-XXXX-XXXX-B3DB-A3DC0DE3C83E",
"PageNumber": 1,
"PageSize": 10,
"TotalCount": 2,
"Cost": "1",
"Data": {
"WorkerGradeId": "g_i4wa7***\n",
"WorkerGradeInfo": {
"Id": "g_i4wa7***\n",
"Name": "i5fuij***",
"Grade": "OMS_G2_MIGRATION_LARGE",
"Spec": "LARGE",
"SpecName": "LARGE",
"SourceType": "OB_MYSQL",
"SourceRegion": "ap-southeast-1",
"DestType": "OB_MYSQL",
"DestRegion": "ap-southeast-1",
"ChargeType": "POSTPAY",
"AutoRenewal": false,
"Expired": false,
"EndTime": "2024-02-02T16:00:00",
"GmtCreate": "2024-01-28T14:07:44"
},
"Id": "np_fe****",
"Type": "SYNC",
"Name": "test",
"Labels": [
{
"Id": "l_dr****",
"Name": "test_tag"
}
],
"Owner": "omsefry***",
"Importance": "HIGH",
"Status": "RUNNING",
"GmtCreate": "2023-07-13T06:26:15",
"GmtModified": "2023-07-13T06:26:15\n",
"GmtStart": "2023-07-13T07:02:27",
"GmtFinish": "2023-07-13T07:02:27",
"DestConnId": "c_deg***",
"IsMerging": true,
"IsModifying": true,
"IsSubProject": false,
"SourceEndpointType": "OB_MYSQL",
"SinkEndpointType": "MYSQL",
"TransferMapping": {
"Mode": "SPECIFIC",
"Databases": [
{
"Type": "MYSQL",
"Id": "db_id",
"Name": "db_name",
"MappedName": "mapped_db",
"TenantName": "tenant_name",
"Tables": [
{
"Name": "table_name",
"MappedName": "mapped_table",
"Id": "table_id",
"WhereClause": "id > 1",
"FilterColumns": [
"col"
],
"ShardColumns": [
"col1"
],
"AdbTableSchema": {
"PrimaryKeys": [
"pk"
],
"DistributedKeys": [
"col2"
],
"PartitionStatement": "PARTITION BY VALUE('id')",
"PartitionLifeCycle": "30"
}
}
],
"Views": [
{
"Name": "view_name",
"MappedName": "mapped_view",
"Id": "fexdg***",
"WhereClause": "id < 1",
"FilterColumns": [
"col"
],
"ShardColumns": [
"col1"
],
"AdbTableSchema": {
"PrimaryKeys": [
"pk"
],
"DistributedKeys": [
"col2"
],
"PartitionStatement": "PARTITION BY VALUE('id')\n",
"PartitionLifeCycle": "30"
}
}
],
"SpecificTables": [
{
"Name": "table_name",
"MappedName": "mapped_table",
"Id": "table_id",
"WhereClause": "id>1",
"FilterColumns": [
"col"
],
"ShardColumns": [
"col"
],
"AdbTableSchema": {
"PrimaryKeys": [
"col"
],
"DistributedKeys": [
"col"
],
"PartitionStatement": "PARTITION BY VALUE('id')\n",
"PartitionLifeCycle": "30"
}
}
],
"SpecificViews": [
{
"Name": "view_name",
"MappedName": "mapped_name",
"Id": "view_id",
"WhereClause": "id<3",
"FilterColumns": [
"col"
],
"ShardColumns": [
"col"
],
"AdbTableSchema": {
"PrimaryKeys": [
"pk"
],
"DistributedKeys": [
"col"
],
"PartitionStatement": "PARTITION BY VALUE('id')\n",
"PartitionLifeCycle": "30"
}
}
]
}
],
"DatabasesBlack": [
{
"Type": "DATABASE",
"Id": "db_id",
"Name": "db_name",
"MappedName": "mapped_db",
"TenantName": "mapped_tenant",
"Tables": [
{
"Name": "table_name",
"MappedName": "mapped_table",
"Id": "table_id",
"WhereClause": "id>1",
"FilterColumns": [
"col"
],
"ShardColumns": [
"col"
],
"AdbTableSchema": {
"PrimaryKeys": [
"pk"
],
"DistributedKeys": [
"col"
],
"PartitionStatement": "PARTITION BY VALUE('id')\n",
"PartitionLifeCycle": "30"
}
}
],
"Views": [
{
"Name": "view_name",
"MappedName": "mapped_name",
"Id": "view_id",
"WhereClause": "id>2",
"FilterColumns": [
"col"
],
"ShardColumns": [
"col"
],
"AdbTableSchema": {
"PrimaryKeys": [
"pk"
],
"DistributedKeys": [
"col"
],
"PartitionStatement": "PARTITION BY VALUE('id')\n",
"PartitionLifeCycle": "30"
}
}
],
"SpecificTables": [
{
"Name": "table_name",
"MappedName": "mapped_table",
"Id": "table_id",
"WhereClause": "id<3",
"FilterColumns": [
"col"
],
"ShardColumns": [
"col"
],
"AdbTableSchema": {
"PrimaryKeys": [
"pk"
],
"DistributedKeys": [
"col"
],
"PartitionStatement": "PARTITION BY VALUE('id')\n",
"PartitionLifeCycle": "30"
}
}
],
"SpecificViews": [
{
"Name": "view_name",
"MappedName": "mapped_view",
"Id": "view_id",
"WhereClause": "id>2",
"FilterColumns": [
"col"
],
"ShardColumns": [
"col"
],
"AdbTableSchema": {
"PrimaryKeys": [
"pk"
],
"DistributedKeys": [
"col"
],
"PartitionStatement": "PARTITION BY VALUE('id')\n",
"PartitionLifeCycle": "30"
}
}
]
}
],
"TableAndViewWhiteList": [
"null"
],
"TableAndViewBlackList": [
"null"
]
},
"CommonTransferConfig": {
"TableCategory": "ALL",
"ActiveActive": true,
"MqSerializerType": "DEFAULT",
"MqPartitionMode": "ONE",
"MqPartition": 0,
"DatahubTopicType": "TUPLE",
"RocketMqProducerGroup": "OMS",
"RocketMqMsgTags": "default_tag",
"RocketMqEnableMsgTrace": true,
"RocketMqSendMsgTimeout": 0,
"DataWorksBusinessName": "null",
"SinkStoreFormat": "",
"SourceStoreFormat": ""
},
"EnableStructTransfer": true,
"StructTransferConfig": {
"ByteCharConvertStrategy": "DO_NOTHING_IF_BYTE_USED",
"DeferIndexCreation": true
},
"EnableFullTransfer": true,
"EnableFullVerify": true,
"FullTransferConfig": {
"NonePkUkTruncateDstTable": false,
"AllowDestTableNotEmpty": true,
"FullTransferSpeedMode": "FAST",
"FullVerifySpeedMode": "FAST",
"WriteWorkerNum": 64,
"ReadWorkerNum": 64,
"ThrottleRps": 0,
"ThrottleIOPS": 0
},
"EnableIncrTransfer": true,
"EnableIncrVerify": true,
"EnableReverseIncrTransfer": true,
"IncrTransferConfig": {
"StartTimestamp": 1667286900,
"RecordTypeWhiteList": [
"INSERT"
],
"StoreLogKeptHour": 24,
"EnableSequencingWithinTxn": false,
"IncrSyncConcurrency": 64,
"EnableIncrSyncStatistics": true,
"ThrottleRps": 0,
"ThrottleIOPS": 0,
"SupportDDLTypes": [
"CREATE_TABLE"
]
},
"ReverseIncrTransferConfig": {
"StartTimestamp": 1687363200,
"RecordTypeWhiteList": [
"INSERT"
],
"StoreLogKeptHour": 24,
"EnableSequencingWithinTxn": true,
"IncrSyncConcurrency": 64,
"EnableIncrSyncStatistics": true,
"ThrottleRps": 0,
"ThrottleIOPS": 0,
"SupportDDLTypes": [
"CREATE_TABLE"
]
},
"SourceConnectInfo": {
"Id": "c_feg****",
"EndpointName": "migon****",
"EndpointId": "e_3kx5i***1s",
"EndpointSide": "source",
"DbEngine": "OB_MYSQL_PUBLIC",
"ConnectionInfo": "null",
"Username": "oms2027obmysql@oms_***",
"Version": "2.2.77",
"Timezone": "+08:00",
"Charset": "utf8mb4",
"NlsLengthSemantics": "null\n",
"OperatingSystem": "Linux",
"Region": "cn-shanghai",
"OcpName": "null",
"ConnExtraAttributes": "null",
"Owner": "oms_test",
"ResourceOwner": "1325847***\n",
"Host": "xxx.xxx.xxx.1",
"Port": 2883
},
"SinkConnectInfo": {
"Id": "e_4lgzuzi9znr4",
"EndpointName": "RATION12948*****",
"EndpointId": "e_4w1q****",
"EndpointSide": "sink",
"DbEngine": "MYSQL_PUBLIC",
"ConnectionInfo": "null",
"Username": "oms2027obmysql@oms_***\n",
"Version": "2.2.77",
"Timezone": "+08:00",
"Charset": "utf8mb4",
"NlsLengthSemantics": "null",
"OperatingSystem": "Linux",
"Region": "cn-hangzhou",
"OcpName": "null",
"ConnExtraAttributes": "null",
"Owner": "oms_test",
"ResourceOwner": "1325847***\n",
"Host": "xxx.xxx.xxx.1\n",
"Port": 2883
},
"Steps": [
{
"Order": 1,
"Name": "PRE_CHECK",
"Description": "预检查",
"Status": "RUNNING",
"ExtraInfo": {
"ErrorDetails": [
{
"Code": "\t\nCM-RESOAT1111\n",
"Level": "ERROR",
"Message": "A system error occurred.\n",
"ExtraContext": {
"key": "null"
},
"MessageMcmsKey": "null",
"MessageMcmsContext": {
"key": "null"
},
"Reason": "null",
"ReasonMcmsKey": "null",
"ReasonMcmsContext": {
"key": "null"
},
"Proposal": "Contact the administrator. \n\n",
"ProposalMcmsKey": "null",
"ProposalMcmsContext": {
"key": "null"
},
"UpstreamErrorDetail": "null"
}
],
"ErrorCode": "INNER_ERROR",
"ErrorMsg": "A system error occurred.\n",
"ErrorParam": {
"key": "null"
},
"FailedTime": "null"
},
"StartTime": "2020-05-22T17:04:18",
"FinishTime": "2020-05-22T17:04:18",
"Progress": 90,
"StepInfo": {
"test": "test",
"test2": 1
}
}
],
"ExtraInfo": {
"RunningStep": "PRE-CHECK",
"RunningProgress": 90,
"MonitoringIncr": true,
"Subtopics": [
"null"
],
"ReverseSubtopics": [
"null"
],
"LogServiceStartCheckpoint": 1689214358,
"SourceStoreKeptHour": 24,
"SyncDelay": 0,
"SyncDelaySampleTimestamp": 1689214358,
"AccessObSource": true,
"OverwriteConfig": true,
"IgnoreUnsupportDdl": false,
"SubDbs": {
"key": [
{
"ClusterName": "cluster_name",
"TenantName": "tenant_name",
"DatabaseId": "null",
"DatabaseName": "db_name",
"MappingDatabaseName": "mapped_db",
"SourceClientId": "null",
"Tables": [
{
"TableId": "fexg***",
"Database": "db_name",
"TableName": "table_name",
"MappingTableName": "mapped_table",
"Instance": "g_i4kat***",
"Columns": [
{
"ColumnName": "null",
"Position": 0,
"ColumnType": "null",
"RecordFieldType": "null",
"RawColumnType": "null",
"ColumnKey": "null",
"Nullable": true,
"DefaultValue": "null",
"DataLength": 0,
"DataPrecision": 64,
"DataScale": 0,
"Encoding": "utf8",
"ColumnComment": "comments",
"IsGenerateField": false
}
]
}
]
}
]
},
"SubConds": {
"key": [
{
"TenantName": "tenant_name",
"Database": "db_name",
"DestDatabase": "dest_db",
"TableName": "table_name",
"DestName": "dest_name",
"WhereClause": "id>1",
"FilterColumns": [
"col"
],
"ShardColumns": [
"col"
],
"LogicTableId": "null",
"SourceEndpointId": "null",
"SourceClientId": "null"
}
]
},
"SubIds": {
"key": "null"
},
"MaxConnectorCount": -1,
"StoreIncr": true,
"IncrSyncTimestamp": 1689244596
},
"AlarmStats": {
"Target": "null",
"Alarming": false,
"RecentlyTriggerCount": 0,
"RuleToRecentlyTriggerCount": {
"key": 0
},
"AlarmContent": "null",
"OpenMonitor": true
}
}
}
错误码
访问错误中心查看更多错误码。
变更历史
变更时间 | 变更内容概要 | 操作 |
---|---|---|
2024-06-26 | OpenAPI 返回结构发生变更 | 查看变更详情 |
2024-04-08 | OpenAPI 返回结构发生变更 | 查看变更详情 |
2024-03-20 | OpenAPI 返回结构发生变更 | 查看变更详情 |