数据库传输服务
参数 | 类型 | 是否必选 | 示例值 | 描述 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
TaskName | String | 否 | | |
TaskType | String | 是 | DataMigration | 任务类型。取值如下:
说明 目前仅支持创建公有网络 MySQL 或专有网络 MySQL 至火山引擎版 MySQL 的数据迁移评估任务。 |
SolutionSettings | 是 | { "MySQL2MySQLIncrDataValidationSettings": { "ObjectMappings": [ { "DestObjName": "test123", "MappingList": [ { "DestObjName": "*", "ObjectType": "Table", "SrcObjName": "*" } ], "ObjectType": "Database", "SrcObjName": "test" } ] }, "SolutionType": "MySQL2MySQLIncrDataValidation" } | 校验任务对象的配置信息。 | |
ParentTaskID | String | 是 | | |
ChargeConfig | 是 | { "ChargeType": "PostPaid" } | 计费配置。 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
SolutionType | String | 是 | MySQL2MySQL | 任务类型。取值如下:
|
AutoStart | Boolean | 否 | false | 任务创建成功后是否自动启动任务。取值如下:
|
MySQL2MySQLSettings | 否 | { "ETLSettings": { "Script": "(defn desensitization []\n (dts/match-table \"user\" (dts/map-column 'id_card str/md5)))" }, "EnableForeignKeyChecks": false, "EnableFullIncr": true, "EnableFullTrxPartitionByChunk": false, "EnableTriggerPreMigration": false, "EnableTrxRewrite": false, "ErrorBehaviorSettings": { "MaxRetrySeconds": 600 }, "FullTransmissionSettings": { "EnableFull": true, "Snapshot": false }, "IncrTransmissionSettings": { "EnableIncr": true, "Statements": [ "StmtDDLAll", "StmtDMLDelete", "StmtDMLInsert", "StmtDMLUpdate" ] }, "MetaTransmissionSettings": { "EnableMeta": true }, "ObjectMappings": [ { "DestObjName": "test", "MappingList": [ { "DestObjName": "*", "ObjectMappingSetting": { "LastWriteWinsKey": "", "ObjectTransTypes": [ "Meta", "Incr", "Full" ], "PolicyForKeyConflict": "TableOverride", "SetObjectTransType": true }, "ObjectType": "Table", "SrcObjName": "*" }, { "DestObjName": "*", "ObjectMappingSetting": { "LastWriteWinsKey": "", "ObjectTransTypes": [ "Meta" ], "PolicyForKeyConflict": "TableNone", "SetObjectTransType": false }, "ObjectType": "View", "SrcObjName": "*" }, { "DestObjName": "*", "ObjectMappingSetting": { "LastWriteWinsKey": "", "ObjectTransTypes": [ "Meta" ], "PolicyForKeyConflict": "TableNone", "SetObjectTransType": false }, "ObjectType": "Function", "SrcObjName": "*" }, { "DestObjName": "*", "ObjectMappingSetting": { "LastWriteWinsKey": "", "ObjectTransTypes": [ "Meta" ], "PolicyForKeyConflict": "TableNone", "SetObjectTransType": false }, "ObjectType": "Procedure", "SrcObjName": "*" }, { "DestObjName": "*", "ObjectMappingSetting": { "LastWriteWinsKey": "", "ObjectTransTypes": [ "Meta" ], "PolicyForKeyConflict": "TableNone", "SetObjectTransType": false }, "ObjectType": "Trigger", "SrcObjName": "*" }, { "DestObjName": "*", "ObjectMappingSetting": { "LastWriteWinsKey": "", "ObjectTransTypes": [ "Meta" ], "PolicyForKeyConflict": "TableNone", "SetObjectTransType": false }, "ObjectType": "Event", "SrcObjName": "*" } ], "ObjectMappingSetting": { "LastWriteWinsKey": "", "ObjectTransTypes": [ "Meta", "Full", "Incr" ], "PolicyForKeyConflict": "TableOverride", "SetObjectTransType": true }, "ObjectType": "Database", "SrcObjName": "test" } ], "PolicyForPrimaryKeyConflict": "Override" } | 在 SolutionType 取值为 MySQL2MySQL 时,实例类型为 MySQL 的源实例迁移或同步至实例类型为 MySQL 的目标实例的参数配置,该参数必选。 | |
MySQL2ESSettings | 否 | { "ESExtraArgs": { "Analyzer": "", "CustomIndexType": "", "IdxNameRule": "DBAndTable", "InsertMode": "<UNSET>", "ReplicaNum": 1, "RetryTimes": 0, "ShardNum": 5, "TZ": "" }, "ETLSettings": { "Script": "" }, "ErrorBehaviorSettings": { "MaxRetrySeconds": 600 }, "FullTransmissionSettings": { "EnableFull": true }, "IncrTransmissionSettings": { "EnableIncr": true, "Statements": [ "StmtDMLDelete", "StmtDMLInsert", "StmtDMLUpdate" ] }, "MetaTransmissionSettings": { "EnableMeta": true }, "ObjectMappings": [ { "DestObjName": "testdb_bak", "MappingList": [ { "DestObjName": "testdb_bak_auth_operation", "ObjectMappingSetting": { "ESMetaMappingSetting": { "EnableRouting": false, "TypeName": "" }, "LastWriteWinsKey": "", "PolicyForKeyConflict": "TableNone", "SetObjectTransType": false }, "ObjectType": "Table", "SrcObjName": "auth_operation" } ], "ObjectType": "Database", "SrcObjName": "testdb_bak" } ], "PolicyForPrimaryKeyConflict": "Override" } | 在 SolutionType 取值为 MySQL2ES 时,实例类型为 MySQL 的源实例同步至实例类型为 ElasticSearch 的目标实例的参数配置,该参数必选。 | |
MySQL2KafkaSettings | 否 | { "ETLSettings": { "Script": "" }, "EnableFullIncr": true, "ErrorBehaviorSettings": { "MaxRetrySeconds": 7200 }, "FullTransmissionSettings": { "EnableFull": true }, "IncrTransmissionSettings": { "EnableIncr": true, "Statements": [ "StmtDMLInsert", "StmtDMLUpdate", "StmtDMLDelete", "StmtDDLAll" ] }, "MetaTransmissionSettings": { "EnableMeta": true }, "ObjectMappings": [ { "DestObjName": "huahua", "MappingList": [ { "DestObjName": "auth_operation", "ObjectMappingSetting": { "LastWriteWinsKey": "", "ObjectTransTypes": [ "Meta", "Incr", "Full" ], "PolicyForKeyConflict": "TableNone", "SetObjectTransType": true }, "ObjectType": "Table", "SrcObjName": "auth_operation" } ], "ObjectMappingSetting": { "LastWriteWinsKey": "", "ObjectTransTypes": [ "Full", "Incr", "Meta" ], "PolicyForKeyConflict": "TableNone", "SetObjectTransType": true }, "ObjectType": "Database", "SrcObjName": "huahua" } ], "SubscriptionSettings": { "EnableBeginCommitMessage": false, "EnableMultiTopic": false, "Location": "", "PartitionPolicy": "Table", "Protocol": "Volc", "SubscribePartBeforeImage": false, "VPCId": "", "VPCSubnetId": "" } } | 在 SolutionType 取值为 MySQL2Kafka 时,实例类型为 MySQL 的源实例订阅到 Kafka 的参数配置,该参数必选。 | |
MySQL2RocketMQSettings | 否 | { "ETLSettings": { "Script": "" }, "ErrorBehaviorSettings": { "MaxRetrySeconds": 600 }, "FullTransmissionSettings": { "EnableFull": true }, "IncrTransmissionSettings": { "EnableIncr": false }, "MetaTransmissionSettings": { "EnableMeta": true }, "ObjectMappings": [ { "DestObjName": "database1", "MappingList": [ { "DestObjName": "*", "ObjectType": "Table", "SrcObjName": "*" } ], "ObjectType": "Database", "SrcObjName": "database1" } ], "SubscriptionSettings": { "EnableBeginCommitMessage": false, "EnableMultiTopic": false, "Location": "", "PartitionPolicy": "Table", "Protocol": "Volc", "SubscribePartBeforeImage": false, "VPCId": "", "VPCSubnetId": "" } } | 在 SolutionType 取值为 MySQL2RocketMQ 时,实例类型为 MySQL 的源实例订阅到消息队列 RocketMQ 版的参数配置,该参数必选。 | |
PG2PGSettings | 否 | { "ObjectMappings": [ { "ObjectType": "Database", "SrcObjName": "0", "DestObjName": "0" }, { "ObjectType": "Table", "SrcObjName": "1", "DestObjName": "1" }, { "ObjectType": "View", "SrcObjName": "2", "DestObjName": "2" }, { "ObjectType": "PostSequence", "SrcObjName": "3", "DestObjName": "3" } ], "MetaTransmissionSettings": { "EnableMeta": "true" }, "FullTransmissionSettings": { "EnableMeta": "true" }, "IncrTransmissionSettings": { "EnableMeta": "true" }, "ErrorBehaviorSettings": { "MaxRetrySeconds": 7200 } } | 在 SolutionType 取值为 PG2PG 时,实例类型为 PostgreSQL 的源实例迁移至实例类型为 PostgreSQL 的目标实例的参数配置,该参数必选。 | |
PG2KafkaSettings | 否 | { "ErrorBehaviorSettings": { "MaxRetrySeconds": 7200 }, "FullTransmissionSettings": { "EnableFull": false }, "IncrTransmissionSettings": { "EnableIncr": true }, "MetaTransmissionSettings": { "EnableMeta": false }, "ObjectMappings": [ { "DestObjName": "public", "MappingList": [ { "DestObjName": "*", "ObjectType": "Table", "SrcObjName": "*" } ], "ObjectType": "Database", "SrcObjName": "public" } ], "SubscriptionSettings": { "EnableBeginCommitMessage": false, "EnableMultiTopic": false, "Location": "", "Protocol": "Volc", "SubscribePartBeforeImage": false, "VPCId": "vpc-3ez4xswg5j94w72200ry****", "VPCSubnetId": "subnet-3ez4xts0nc4qo72200r******" } } | 在 SolutionType 取值为 PG2Kafka 时,实例类型为 PostgreSQL 的源实例订阅到 Kafka 的参数配置,该参数必选。 | |
PG2RocketMQSettings | 否 | { "ETLSettings": { "Script": "" }, "ErrorBehaviorSettings": { "MaxRetrySeconds": 600 }, "FullTransmissionSettings": { "EnableFull": false }, "IncrTransmissionSettings": { "EnableIncr": true }, "MetaTransmissionSettings": { "EnableMeta": false }, "ObjectMappings": [ { "DestObjName": "public", "MappingList": [ { "DestObjName": "*", "ObjectType": "Table", "SrcObjName": "*" } ], "ObjectType": "Database", "SrcObjName": "public" } ], "SubscriptionSettings": { "EnableBeginCommitMessage": false, "EnableMultiTopic": false, "Location": "", "PartitionPolicy": "Table", "Protocol": "Volc", "SubscribePartBeforeImage": false, "VPCId": "", "VPCSubnetId": "" } } | 在 SolutionType 取值为 PG2RocketMQ 时,实例类型为 PostgreSQL 的源实例订阅到消息队列 RocketMQ 版的参数配置,该参数必选。 | |
Mongo2MongoSettings | 否 | { "TaskName": "test", "TrafficSpec": "Standard", "ProjectName": "default", "Tags": [ ], "CreateBackwardSyncTask": false, "ChargeConfig": { "ChargeType": "PostPaid", "Times": 1 }, "SrcConfig": { "EndpointType": "Public_Mongo", "PublicMongoSettings": { "RegionSettings": { "Region": "×××××××××" }, "DeployType": "ShardedCluster", "PullMethod": "Oplog", "Endpoints": [ "192.168..***.***:27***" ], "MongoAuthSourceDB": "admin", "Username": "root", "Password": "admin", "Shards": [ { "Username": "root", "Password": "admin", "Address": "192.168.***.***:27***,192.168.***.***:27***", "AuthDb": "admin" }, { "Address": "192.168.***.***:27***,192.168.***.***:27***", "AuthDb": "admin", "Username": "root", "Password": "admin" } ], "UseNewShardingDatasource": true } }, "DestConfig": { "EndpointType": "Volc_Mongo", "VolcMongoSettings": { "RegionSettings": { "Region": "×××××××××" }, "DeployType": "ShardedCluster", "PullMethod": "None", "DBInstanceId": "mongo-shard-××××××××", "Username": "root", "Password": "admin", "UseNewShardingDatasource": true } }, "SolutionSettings": { "SolutionType": "Mongo2Mongo", "Mongo2MongoSettings": { "TaskRunType": [ "Incr", "Full", "Meta" ], "PolicyForMongoPrimaryKeyConflict": "Override", "ObjectMappings": [ { "ObjectType": "Database", "SrcObjName": "test", "DestObjName": "test", "MappingList": [ { "ObjectType": "Table", "SrcObjName": "*", "DestObjName": "*" } ] } ], "ErrorBehaviorSettings": { "MaxRetrySeconds": 600 }, "FullTransmissionSettings": { "FullSyncParalell": 8, "EnableFull": true }, "AccountTransmissionSettings": { "EnableAccount": false }, "MetaTransmissionSettings": { "EnableMeta": true }, "IncrTransmissionSettings": { "EnableIncr": true } } }, "TaskType": "DataSynchronization" } | 在 SolutionType 取值为 Mongo2Mongo 时,实例类型为 MongoDB 的源实例迁移至实例类型为 MongoDB 的目标实例的参数配置,该参数必选。 | |
Redis2RedisSettings | 否 | { "TaskName": "rudonxxxxx-1", "TaskType": "DataMigration", "TrafficSpec": "Compact", "ProjectName": "default", "Tags": [ { "Key": "key1", "Value": "value1" } ], "SrcConfig": { "EndpointType": "Public_Redis", "PublicRedisSettings": { "Host": "192.168.***.***", "Port": 4, "Username": "test****", "Password": "test****", "DBName": "test****", "RegionSettings": { "Region": "cn-beijing" } } }, "DestConfig": { "EndpointType": "Volc_Redis", "VolcRedisSettings": { "RegionSettings": { "Region": "cn-beijing" }, "DBInstanceId": "redis-cnlfe66ipof9y86qz", "Username": "default", "Password": "ASDFasdf@2020" } }, "SolutionSettings": { "SolutionType": "Redis2Redis", "Redis2RedisSettings": { "ObjectMappings": [ { "ObjectType": "Database", "SrcObjName": "0", "DestObjName": "0" }, { "ObjectType": "Database", "SrcObjName": "1", "DestObjName": "1" }, { "ObjectType": "Database", "SrcObjName": "2", "DestObjName": "2" } ], "ErrorBehaviorSettings": { "MaxRetrySeconds": 7200 }, "FullTransmissionSettings": { "EnableFull": true }, "IncrTransmissionSettings": { "EnableIncr": false } } }, "ChargeConfig": { "ChargeType": "PostPaid" } } | 在 SolutionType 取值为 Redis2Redis 时,实例类型为 Redis 的源实例迁移至实例类型为 Redis 的目标实例的参数配置,该参数必选。 | |
EnableMsLvlLatency | Boolean | 否 | false | 是否开启开启毫秒级延迟监控。取值如下:
说明 支持在创建以下任务时设置该参数:
|
Tos2MySQLReplaySettings | 否 | | |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
ObjectMappings | 是 | [ { "DestObjName": "test", "MappingList": [ { "DestObjName": "*", "ObjectMappingSetting": { "LastWriteWinsKey": "", "ObjectTransTypes": [ "Meta" ], "PolicyForKeyConflict": "TableNone", "SetObjectTransType": false }, "ObjectType": "Event", "SrcObjName": "*" } ], "ObjectMappingSetting": { "LastWriteWinsKey": "", "ObjectTransTypes": [ "Meta", "Full", "Incr" ], "PolicyForKeyConflict": "TableOverride", "SetObjectTransType": true }, "ObjectType": "Database", "SrcObjName": "test" } ] | 源端和目标端对象的映射信息。 | |
EnableForeignKeyChecks | Boolean | 是 | false | 按需选择是否开启外键检查,开启外键检查后,支持迁移源库的外键级联更新、删除等操作,从而保证数据迁移的完整性和一致性。取值如下:
说明 仅 TaskType 取值为 DataMigration时支持配置此参数。 |
AccountTransmissionSettings | 否 | { "EnableAccount": true } | 将源库中指定的非系统账号及账号所拥有的权限迁移到目标库。 说明 仅 TaskType 取值为 DataMigration 或 DataSynchronization时支持配置此参数。 | |
MetaTransmissionSettings | 否 | { "EnableMeta": true, "DisablePostMeta": true } | 读取源库表结构定义语法,重新组装成目标库的语法格式。根据不同任务,该参数意义有所差异,具体如下所示:
| |
FullTransmissionSettings | 否 | { "EnableFull": true, "Snapshot": true, "RPSLimit": 100000, "BPSLimit": 25000, "FullSyncParalell": 8, "ExtraConditions": { "Db": "TestName", "Table": "TableName", "WhereSql": "id = 5" } } | 全量读取源表内容并写到对应的目标库。根据不同任务,该参数意义有所差异,具体如下所示:
| |
IncrTransmissionSettings | 否 | { "EnableIncr": true, "Statements": [ "StmtDDLAll", "StmtDMLDelete", "StmtDMLUpdate", "StmtDMLInsert" ] } | 通过对目标库增量日志的解析和回放。根据不同任务,该参数意义有所差异,具体如下所示:
说明 在 TaskType 取值为 DataSynchronization时,该参数必填。 | |
ETLSettings | 否 | { "Script": "(defn desensitization []\n (dts/match-table \"user\" (dts/map-column 'id_card str/md5)))" } | ETL 参数配置。 | |
ErrorBehaviorSettings | 否 | { "MaxRetrySeconds": 7200 } | 错误重试时间。当源库或目标库断连后,若能在该时间内重新连上,任务即可自动恢复。取值范围:600~86400,单位:秒(s)。 | |
MySQLPosition | 否 | { "Gtid": "3e11fa47-71ca-11e1-9e33-c80aa9429562:58", "Gset":"f76eb90f-82a2-11e5-a162-7ca23e9126c5:3", "Timestamp":1679642652 } | 设置从某指定位点或时间点拉取 Binlog 日志。 说明
| |
PolicyForPrimaryKeyConflict | String | 否 | Override | 主键冲突处理。当目标库已存在同主键值的行时的处理方法,取值如下:
说明 在取值为 Ignore时,可能会导致数据不一致,给业务带来风险,请谨慎选择。 |
AccountMapping | 否 | { "Account": "test****", "ResetPassword": "true", "Password": "*Test****" } | 待迁移的数据库账号信息。 说明 仅 TaskType 取值为 DataMigration 或 DataSynchronization时支持配置此参数。 | |
EnableTrxRewrite | Boolean | 否 | true | 选择是否在传输数据时进行事务合并。开启事务合并是一种优化传输任务的方法,通过合并多个单独事务提高传输任务的整体效率和性能,并确保数据一致性。当数据传输频繁且数据量较大时,开启事务合并可以提高数据传输的效率。
|
参数 | 类型 | 是否必选 | 示例值 | 描述 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
ObjectType | String | 是 | Function | 对象类型。取值如下:
|
SrcObjName | String | 是 | ceshi**** | 源端对象名称。 |
DestObjName | String | 是 | test**** | 目标端对象名称。 |
MappingList | 否 | [ { "DestObjName": "test", "MappingList": [ { "DestObjName": "*", "ObjectMappingSetting": { "LastWriteWinsKey": "", "ObjectTransTypes": [ "Meta" ], "PolicyForKeyConflict": "TableNone", "SetObjectTransType": false }, "ObjectType": "Event", "SrcObjName": "*" } ], "ObjectMappingSetting": { "LastWriteWinsKey": "", "ObjectTransTypes": [ "Meta", "Full", "Incr" ], "PolicyForKeyConflict": "TableOverride", "SetObjectTransType": true }, "ObjectType": "Database", "SrcObjName": "test" } ] | 传输任务对象。 | |
ObjectMappingSetting | 否 | { "ESMetaMappingSetting": { "PidCol": [ "id", "name" ], "EnableRouting": true, "RoutingCol": [ "id" ] } } | 在数据同步至 ElasticSearch 时,需配置的其他参数信息。 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
ESMetaMappingSetting | 否 | { "PidCol": [ "id", "name" ], "EnableRouting": true, "RoutingCol": [ "id" ] } | ElasticSearch 的结构映射参数。 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
PidCol | Array of String | 否 | ["id", "name"] | 主键(_id)取值。当不设置此参数时,默认为主键的列。 |
EnableRouting | Boolean | 否 | EnableRouting | 是否启用 Routing,取值如下:
|
RoutingCol | Array of String | 否 | ["id"] | _routing 的取值。当 EnableRouting 取值为 true 时,该参数必选。 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
EnableAccount | Boolean | 否 | false | 是否开启用户迁移。取值如下:
|
参数 | 类型 | 是否必选 | 示例值 | 描述 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
EnableMeta | Boolean | 否 | true | 是否开启库表结构迁移或订阅。取值如下:
|
DisablePostMeta | Boolean | 否 | true | 当 PostgreSQL 数据库迁移/同步类型中选择结构迁移/结构初始化时,DTS 会自动在增量迁移/同步结束后迁移/同步后置结构,您也可以选择跳过后置结构迁移/同步,即 DTS 不迁移/同步后置结构。 PostgreSQL 数据库后置结构/同步迁移对象包括普通触发器、事件触发器、RULE、互斥约束、外键约束、检查约束、Domain 约束、设置 Sequence 值。 是否跳过 PostgreSQL 后置结构迁移或后置结构同步。取值如下:
|
参数 | 类型 | 是否必选 | 示例值 | 描述 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
EnableFull | Boolean | 否 | true | 是否开启全量迁移、全量订阅或全量初始化。取值如下:
|
Snapshot | Boolean | 否 | true | 是否开启全量一致性迁移。取值如下:
|
ExtraConditions | 否 | { "Db": "TestName", "Table": "TableName", "WhereSql": "id = 5" } | 全量过滤条件。 | |
RPSLimit | Integer | 否 | 100000 | 每秒迁移或同步的行数,取值范围为 1~100000,默认值为 100000。 |
BPSLimit | Integer | 否 | 25000 | 每秒迁移或同步的数据量,取值范围 1~25000,单位 KB,默认值为 25000。 |
FullSyncParalell | Integer | 否 | 8 | 迁移或同步任务的并发数。默认值 8,取值范围 1~64。 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
Db | String | 否 | TestName | 需要过滤的数据库名称。 |
Table | String | 否 | TableName | 需要过滤的表格名称。 |
WhereSql | String | 否 | id = 5 | 过滤的 SQL 语句。 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
EnableIncr | Boolean | 否 | true | 是否开启增量迁移、增量订阅或增量同步。取值如下:
说明 当 TaskType 取值为 DataSynchronization时,该参数必填。 |
Statements | Array of String | 否 | [ "StmtDDLAll", "StmtDMLDelete", "StmtDMLUpdate", "StmtDMLInsert" ] | 需要传输的操作语句。取值如下:
|
参数 | 类型 | 是否必选 | 示例值 | 描述 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
Script | String | 否 | (defn desensitization [] (dts/match-table "user" (dts/map-column 'id_card str/md5))) |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
MaxRetrySeconds | Integer | 否 | 600 | 最大错误重试时间。取值范围:600~86400,单位:秒(s)。默认值为 600 秒。 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
Gtid | String | 否 | 3e11fa47-71ca-11e1-9e33-c80aa9429562:58 | 表示从指定的 GTID 开始拉取 Binlog 日志,格式为 source_id:transaction_id。 |
Gset | String | 否 | f76eb90f-82a2-11e5-a162-7ca23e9126c5:3 | 表示从指定的 GTID_EXECUTED 开始拉取 Binlog 日志,格式为 source_id:transaction_id,当存在多个时,可使用英文逗号(,)隔开。 说明 |
Timestamp | Long | 否 | 1679642652 | 表示从指定的时间戳开始拉取 Binlog 日志。 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
Account | String | 是 | test**** | 待迁移的账号名称。 |
ResetPassword | Boolean | 否 | true | 是否重置密码,取值如下:
|
Password | String | 否 | *Test**** | 待迁移账号的新密码。 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
MetaTransmissionSettings | 否 | { "EnableMeta": true, "DisablePostMeta": true } | 读取源库表结构定义语法,重新组装成目标库的语法格式。根据不同任务,该参数意义有所差异,具体如下所示:
| |
FullTransmissionSettings | 否 | { "EnableFull": true, "Snapshot": true, "RPSLimit": 100000, "BPSLimit": 25000, "FullSyncParalell": 8, "ExtraConditions": { "Db": "TestName", "Table": "TableName", "WhereSql": "id = 5" } } | 全量读取源表内容并写到对应的目标库。根据不同任务,该参数意义有所差异,具体如下所示:
| |
IncrTransmissionSettings | 否 | { "EnableIncr": true, "Statements": [ "StmtDDLAll", "StmtDMLDelete", "StmtDMLUpdate", "StmtDMLInsert" ] } | 通过对目标库增量日志的解析和回放。根据不同任务,该参数意义有所差异,具体如下所示:
说明 当 TaskType 取值为 DataSynchronization时,该参数必填。 | |
ObjectMappings | 否 | [ { "DestObjName": "huahua", "MappingList": [ { "DestObjName": "*", "ObjectType": "Table", "SrcObjName": "*" } ], "ObjectType": "Database", "SrcObjName": "huahua" } ] | 源端和目标端对象的映射信息。 | |
ETLSettings | 否 | { "Script": "(defn desensitization []\n (dts/match-table \"user\" (dts/map-column 'id_card str/md5)))" } | 流式数据 ETL 参数配置。 | |
ErrorBehaviorSettings | 否 | { "MaxRetrySeconds": 7200 } | 错误重试时间。当源库或目标库断连后,若能在该时间内重新连上,任务即可自动恢复。取值范围:600~86400,单位:秒(s)。 | |
ESExtraArgs | 否 | { "IdxNameRule": "Table", "ShardNum": 3, "ReplicaNum": 1, "TZ": "UTC +08:00", "RetryTimes": 600, "Analyzer": "standard", "InsertMode": "Replace" } | 在同步至 Elasticsearch 时的参数信息。 | |
PolicyForPrimaryKeyConflict | String | 否 | ThrowError | 主键冲突处理。当目标库已存在同主键值的行时的处理方法,取值如下:
说明 在取值为 Ignore时,可能会导致数据不一致,给业务带来风险,请谨慎选择。 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
IdxNameRule | String | 否 | Table | 索引拼接规则。
|
ShardNum | Long | 否 | 3 | 分片数。 |
ReplicaNum | Long | 否 | 1 | 副本数。 |
TZ | String | 否 | UTC +08:00 | 时区。支持 UTC -12:00 ~ +13:00。默认值为 Region 所在的 TimeZone。 |
RetryTimes | Long | 否 | 7200 | 错误重试时间。 |
Analyzer | String | 否 | standard | 支持的分词器。 |
InsertMode | String | 否 | Replace | 源端的插入操作,取值如下:
|
参数 | 类型 | 是否必选 | 示例值 | 描述 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
SubscriptionSettings | 是 | { "Protocol": "Volc", "PartitionPolicy": "P0", "VPCId": "vpc-bp1opxu1zkhn00gz****", "VPCSubnetId": "AttachPoints.1.SubnetId=subnet-2fexiqjlgjif45oxruvso****&AttachPoints.2.SubnetId=subnet-7rtsu6whhle6j****", "EnableBeginCommitMessage": false, "SubscribePartBeforeImage": false } | 订阅任务对象的配置信息。 | |
ObjectMappings | 是 | [ { "DestObjName": "test", "MappingList": [ { "DestObjName": "*", "ObjectMappingSetting": { "LastWriteWinsKey": "", "ObjectTransTypes": [ "Meta" ], "PolicyForKeyConflict": "TableNone", "SetObjectTransType": false }, "ObjectType": "Event", "SrcObjName": "*" } ], "ObjectMappingSetting": { "LastWriteWinsKey": "", "ObjectTransTypes": [ "Meta", "Full", "Incr" ], "PolicyForKeyConflict": "TableOverride", "SetObjectTransType": true }, "ObjectType": "Database", "SrcObjName": "test" } ] | 源端和目标端对象的映射信息。 | |
ETLSettings | 否 | { "Script": "(defn desensitization []\n (dts/match-table \"user\" (dts/map-column 'id_card str/md5)))" } | ETL 参数配置。 | |
ErrorBehaviorSettings | 否 | { "MaxRetrySeconds": 7200 } | 错误重试时间。当源库或目标库断连后,若能在该时间内重新连上,任务即可自动恢复。 | |
MetaTransmissionSettings | 否 | { "EnableMeta": true, "DisablePostMeta": true } | 读取源库表结构定义语法,重新组装成目标库的语法格式。根据不同任务,该参数意义有所差异,具体如下所示:
| |
FullTransmissionSettings | 否 | { "EnableFull": true, "Snapshot": true, "RPSLimit": 100000, "BPSLimit": 25000, "FullSyncParalell": 8, "ExtraConditions": { "Db": "TestName", "Table": "TableName", "WhereSql": "id = 5" } } | 全量读取源表内容并写到对应的目标库。根据不同任务,该参数意义有所差异,具体如下所示:
| |
IncrTransmissionSettings | 否 | { "EnableIncr": true, "Statements": [ "StmtDDLAll", "StmtDMLDelete", "StmtDMLUpdate", "StmtDMLInsert" ] } | 通过对目标库增量日志的解析和回放。根据不同任务,该参数意义有所差异,具体如下所示:
说明 当 TaskType 取值为 DataSynchronization时,该参数必填。 | |
MySQLPosition | 否 | { "Gtid": "3e11fa47-71ca-11e1-9e33-c80aa9429562:58", "Gset": "f76eb90f-82a2-11e5-a162-7ca23e9126c5:3", "Timestamp": 1679642652 } | 设置从某指定位点或时间点拉取 Binlog 日志。 说明
|
参数 | 类型 | 是否必选 | 示例值 | 描述 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
Protocol | String | 否 | Volc | 数据订阅格式。取值如下:
|
PartitionPolicy | String | 否 | P0 | Topic 的 Partition 接收策略。取值如下:
说明 当 TaskType 取值为 DataSubscription,且 EndpointType 取值为 Volc_Kafka时,支持此配置。 |
VPCId | String | 否 | vpc-bp1opxu1zkhn00gz**** | 私有网络 ID。 |
VPCSubnetId | String | 否 | AttachPoints.1.SubnetId=subnet-2fexiqjlgjif45oxruvso****&AttachPoints.2.SubnetId=subnet-7rtsu6whhle6j**** | 私有网络 ID 内的子网 ID。 说明 私有网络内的子网至少要包含 1 个可用 IP。 |
EnableBeginCommitMessage | Boolean | 否 | false | 按需设置是否按照事务维度进行订阅消息,从而确保消息的一致性和完整性。取值如下:
说明 需要同时满足以下条件时,才支持配置该参数:
|
SubscribePartBeforeImage | Boolean | 否 | true | 按需设置是否订阅所有字段。取值如下:
说明 只有当实例类型为 MySQL,中间件接入方式为消息队列 Kafka 版或专有网络 Kafka,且订阅格式选择 Canal JSON 时,才支持配置该参数。 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
SubscriptionSettings | 是 | { "Protocol": "Volc", "PartitionPolicy": "P0", "VPCId": "vpc-bp1opxu1zkhn00gz****", "VPCSubnetId": "subnet-7rtsu6whhle6j****", "EnableBeginCommitMessage": true, "SubscribePartBeforeImage": true } | 订阅任务对象的配置信息。 | |
ObjectMappings | 是 | [ { "DestObjName": "test", "MappingList": [ { "DestObjName": "*", "ObjectMappingSetting": { "LastWriteWinsKey": "", "ObjectTransTypes": [ "Meta" ], "PolicyForKeyConflict": "TableNone", "SetObjectTransType": false }, "ObjectType": "Event", "SrcObjName": "*" } ], "ObjectMappingSetting": { "LastWriteWinsKey": "", "ObjectTransTypes": [ "Meta", "Full", "Incr" ], "PolicyForKeyConflict": "TableOverride", "SetObjectTransType": true }, "ObjectType": "Database", "SrcObjName": "test" } ] | 源端和目标端对象的映射信息。 | |
ETLSettings | 否 | { "Script": "(defn desensitization []\n (dts/match-table \"user\" (dts/map-column 'id_card str/md5)))" } | 流式数据 ETL 的参数配置。 | |
ErrorBehaviorSettings | 否 | { "MaxRetrySeconds": 7200 } | 错误重试时间。当源库或目标库断连后,若能在该时间内重新连上,任务即可自动恢复。取值范围:600~86400,单位:秒(s)。 | |
MetaTransmissionSettings | 否 | { "EnableMeta": true, "DisablePostMeta": true } | 读取源库表结构定义语法,重新组装成目标库的语法格式。根据不同任务,该参数意义有所差异,具体如下所示:
| |
FullTransmissionSettings | 否 | { "EnableFull": true, "Snapshot": true, "RPSLimit": 100000, "BPSLimit": 25000, "FullSyncParalell": 8, "ExtraConditions": { "Db": "TestName", "Table": "TableName", "WhereSql": "id = 5" } } | 全量读取源表内容并写到对应的目标库。根据不同任务,该参数意义有所差异,具体如下所示:
| |
IncrTransmissionSettings | 否 | { "EnableIncr": true, "Statements": [ "StmtDDLAll", "StmtDMLDelete", "StmtDMLUpdate", "StmtDMLInsert" ] } | 通过对目标库增量日志的解析和回放。根据不同任务,该参数意义有所差异,具体如下所示:
说明 当 TaskType 取值为 DataSynchronization时,该参数必填。 | |
MySQLPosition | 否 | { "Gtid": "3e11fa47-71ca-11e1-9e33-c80aa9429562:58", "Gset": "f76eb90f-82a2-11e5-a162-7ca23e9126c5:3", "Timestamp": 1679642652 } | 设置从某指定位点或时间点拉取 Binlog 日志。 说明
|
参数 | 类型 | 是否必选 | 示例值 | 描述 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
MetaTransmissionSettings | 否 | { "EnableMeta": true, "DisablePostMeta": true } | 读取源库表结构定义语法,重新组装成目标库的语法格式。根据不同任务,该参数意义有所差异,具体如下所示:
| |
FullTransmissionSettings | 否 | { "EnableFull": true, "Snapshot": true, "RPSLimit": 100000, "BPSLimit": 25000, "FullSyncParalell": 8, "ExtraConditions": { "Db": "TestName", "Table": "TableName", "WhereSql": "id = 5" } } | 全量读取源表内容并写到对应的目标库。根据不同任务,该参数意义有所差异,具体如下所示:
| |
IncrTransmissionSettings | 否 | { "EnableIncr": true, "Statements": [ "StmtDDLAll", "StmtDMLDelete", "StmtDMLUpdate", "StmtDMLInsert" ] } | 通过对目标库增量日志的解析和回放。根据不同任务,该参数意义有所差异,具体如下所示:
说明 当 TaskType 取值为 DataSynchronization时,该参数必填。 | |
ObjectMappings | 是 | [ { "DestObjName": "huahua", "MappingList": [ { "DestObjName": "*", "ObjectType": "Table", "SrcObjName": "*" } ], "ObjectType": "Database", "SrcObjName": "huahua" } ] | 源端和目标端对象的映射信息。 | |
ETLSettings | 否 | { "Script": "(defn desensitization []\n (dts/match-table \"user\" (dts/map-column 'id_card str/md5)))" } | ETL 参数配置。 | |
ErrorBehaviorSettings | 否 | { "MaxRetrySeconds": 7200 } | 错误重试时间。当源库或目标库断连后,若能在该时间内重新连上,任务即可自动恢复。取值范围:600~86400,单位:秒(s)。 | |
SkipNoPermissionTables | Boolean | 否 | | |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
SubscriptionSettings | 是 | { "Protocol": "Volc", "PartitionPolicy": "P0", "VPCId": "vpc-bp1opxu1zkhn00gz****", "VPCSubnetId": "subnet-7rtsu6whhle6j****", "EnableBeginCommitMessage": true, "SubscribePartBeforeImage": true } | 订阅任务对象的配置信息。 | |
ObjectMappings | 是 | [ { "DestObjName": "test", "MappingList": [ { "DestObjName": "*", "ObjectMappingSetting": { "LastWriteWinsKey": "", "ObjectTransTypes": [ "Meta" ], "PolicyForKeyConflict": "TableNone", "SetObjectTransType": false }, "ObjectType": "Event", "SrcObjName": "*" } ], "ObjectMappingSetting": { "LastWriteWinsKey": "", "ObjectTransTypes": [ "Meta", "Full", "Incr" ], "PolicyForKeyConflict": "TableOverride", "SetObjectTransType": true }, "ObjectType": "Database", "SrcObjName": "test" } ] | 源端和目标端对象的映射信息。 | |
ETLSettings | 否 | { "Script": "(defn desensitization []\n (dts/match-table \"user\" (dts/map-column 'id_card str/md5)))" } | ETL 参数配置。 | |
ErrorBehaviorSettings | 否 | { "MaxRetrySeconds": 7200 } | 错误重试时间。当源库或目标库断连后,若能在该时间内重新连上,任务即可自动恢复。 | |
MetaTransmissionSettings | 否 | { "EnableMeta": true, "DisablePostMeta": true } | 读取源库表结构定义语法,重新组装成目标库的语法格式。根据不同任务,该参数意义有所差异,具体如下所示:
| |
FullTransmissionSettings | 否 | { "EnableFull": true, "Snapshot": true, "RPSLimit": 100000, "BPSLimit": 25000, "FullSyncParalell": 8, "ExtraConditions": { "Db": "TestName", "Table": "TableName", "WhereSql": "id = 5" } } | 全量读取源表内容并写到对应的目标库。根据不同任务,该参数意义有所差异,具体如下所示:
| |
IncrTransmissionSettings | 否 | { "EnableIncr": true, "Statements": [ "StmtDDLAll", "StmtDMLDelete", "StmtDMLUpdate", "StmtDMLInsert" ] } | 通过对目标库增量日志的解析和回放。根据不同任务,该参数意义有所差异,具体如下所示:
说明 当 TaskType 取值为 DataSynchronization时,该参数必填。 | |
SkipNoPermissionTables | Boolean | 否 | | |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
SubscriptionSettings | 是 | { "Protocol": "Volc", "PartitionPolicy": "P0", "VPCId": "vpc-bp1opxu1zkhn00gz****", "VPCSubnetId": "subnet-7rtsu6whhle6j****", "EnableBeginCommitMessage": true, "SubscribePartBeforeImage": true } | 订阅任务对象的配置信息。 | |
ObjectMappings | 是 | [ { "DestObjName": "test", "MappingList": [ { "DestObjName": "*", "ObjectMappingSetting": { "LastWriteWinsKey": "", "ObjectTransTypes": [ "Meta" ], "PolicyForKeyConflict": "TableNone", "SetObjectTransType": false }, "ObjectType": "Event", "SrcObjName": "*" } ], "ObjectMappingSetting": { "LastWriteWinsKey": "", "ObjectTransTypes": [ "Meta", "Full", "Incr" ], "PolicyForKeyConflict": "TableOverride", "SetObjectTransType": true }, "ObjectType": "Database", "SrcObjName": "test" } ] | 源端和目标端对象的映射信息。 | |
ETLSettings | 否 | { "Script": "(defn desensitization []\n (dts/match-table \"user\" (dts/map-column 'id_card str/md5)))" } | ETL 参数配置。 | |
ErrorBehaviorSettings | 否 | { "MaxRetrySeconds": 7200 } | 错误重试时间。当源库或目标库断连后,若能在该时间内重新连上,任务即可自动恢复。 | |
MetaTransmissionSettings | 否 | { "EnableMeta": true, "DisablePostMeta": true } | 读取源库表结构定义语法,重新组装成目标库的语法格式。根据不同任务,该参数意义有所差异,具体如下所示:
| |
FullTransmissionSettings | 否 | { "EnableFull": true, "Snapshot": true, "RPSLimit": 100000, "BPSLimit": 25000, "FullSyncParalell": 8, "ExtraConditions": { "Db": "TestName", "Table": "TableName", "WhereSql": "id = 5" } } | 全量读取源表内容并写到对应的目标库。根据不同任务,该参数意义有所差异,具体如下所示:
| |
IncrTransmissionSettings | 否 | { "EnableIncr": true, "Statements": [ "StmtDDLAll", "StmtDMLDelete", "StmtDMLUpdate", "StmtDMLInsert" ] } | 通过对目标库增量日志的解析和回放。根据不同任务,该参数意义有所差异,具体如下所示:
说明 当 TaskType 取值为 DataSynchronization时,该参数必填。 | |
SkipNoPermissionTables | Boolean | 否 | | |
SkipMessageOverMaxLength | Boolean | 否 | | |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
ObjectMappings | 是 | [ { "DestObjName": "test", "MappingList": [ { "DestObjName": "*", "ObjectMappingSetting": { "LastWriteWinsKey": "", "ObjectTransTypes": [ "Meta" ], "PolicyForKeyConflict": "TableNone", "SetObjectTransType": false }, "ObjectType": "Event", "SrcObjName": "*" } ], "ObjectMappingSetting": { "LastWriteWinsKey": "", "ObjectTransTypes": [ "Meta", "Full", "Incr" ], "PolicyForKeyConflict": "TableOverride", "SetObjectTransType": true }, "ObjectType": "Database", "SrcObjName": "test" } ] | 源端和目标端对象的映射信息。 | |
MetaTransmissionSettings | 否 | { "EnableMeta": true, "DisablePostMeta": true } | 读取源库表结构定义语法,重新组装成目标库的语法格式。根据不同任务,该参数意义有所差异,具体如下所示:
| |
FullTransmissionSettings | 否 | { "EnableFull": true, "Snapshot": true, "RPSLimit": 100000, "BPSLimit": 25000, "FullSyncParalell": 8, "ExtraConditions": { "Db": "TestName", "Table": "TableName", "WhereSql": "id = 5" } } | 全量读取源表内容并写到对应的目标库。根据不同任务,该参数意义有所差异,具体如下所示:
| |
IncrTransmissionSettings | 否 | { "EnableIncr": true, "Statements": [ "StmtDDLAll", "StmtDMLDelete", "StmtDMLUpdate", "StmtDMLInsert" ] } | 通过对目标库增量日志的解析和回放。根据不同任务,该参数意义有所差异,具体如下所示:
说明 当 TaskType 取值为 DataSynchronization时,该参数必填。 | |
ETLSettings | 否 | { "Script": "(defn desensitization []\n (dts/match-table \"user\" (dts/map-column 'id_card str/md5)))" } | ETL 参数配置。 | |
ErrorBehaviorSettings | 否 | { "MaxRetrySeconds": 7200 } | 错误重试时间。当源库或目标库断连后,若能在该时间内重新连上,任务即可自动恢复。 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
ObjectMappings | 是 | [ { "DestObjName": "test", "MappingList": [ { "DestObjName": "*", "ObjectMappingSetting": { "LastWriteWinsKey": "", "ObjectTransTypes": [ "Meta" ], "PolicyForKeyConflict": "TableNone", "SetObjectTransType": false }, "ObjectType": "Event", "SrcObjName": "*" } ], "ObjectMappingSetting": { "LastWriteWinsKey": "", "ObjectTransTypes": [ "Meta", "Full", "Incr" ], "PolicyForKeyConflict": "TableOverride", "SetObjectTransType": true }, "ObjectType": "Database", "SrcObjName": "test" } ] | 源端和目标端对象的映射信息。 | |
FullTransmissionSettings | 否 | { "EnableFull": true, "Snapshot": true, "RPSLimit": 100000, "BPSLimit": 25000, "FullSyncParalell": 8, "ExtraConditions": { "Db": "TestName", "Table": "TableName", "WhereSql": "id = 5" } } | 全量读取源表内容并写到对应的目标库。根据不同任务,该参数意义有所差异,具体如下所示:
| |
IncrTransmissionSettings | 否 | { "EnableIncr": true, "Statements": [ "StmtDDLAll", "StmtDMLDelete", "StmtDMLUpdate", "StmtDMLInsert" ] } | 通过对目标库增量日志的解析和回放。根据不同任务,该参数意义有所差异,具体如下所示:
说明 当 TaskType 取值为 DataSynchronization时,该参数必填。 | |
ErrorBehaviorSettings | 否 | { "MaxRetrySeconds": 7200 } | 错误重试时间。当源库或目标库断连后,若能在该时间内重新连上,任务即可自动恢复。 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
Files | Array of String | 否 | | |
ReplayType | Array of String | 否 | | |
EndTimestamp | Long | 否 | | |
ReplayLogType | String | 否 | | |
StartTimestamp | Long | 否 | | |
ReplayPressurePercentage | Integer | 否 | | |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
ChargeType | String | 否 | PrePaid | 计费类型,取值如下:
|
Times | Integer | 否 | 12 | 购买时长。 说明 在 ChargeType 取值为 PrePaid时,支持此配置。 |
AutoRenew | Boolean | 否 | true | 是否自动续费,取值如下:
|
OneStep | Boolean | 否 | false | 是否立即付费,取值如下:
|
参数 | 类型 | 示例值 | 描述 |
参数 | 类型 | 示例值 | 描述 |
TaskId | String | fdea8d75b3c343b0940a67bd****** | 数据校验任务 ID。 |