CreateMmsTimer - 创建数据迁移定时任务

更新时间:
复制为 MD 格式

CreateMmsTimer

接口说明

请确保在使用该接口前,已充分了解了数据传输服务独享资源组和弹性预留计算资源的收费方式和价格

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

当前API暂无授权信息透出。

请求语法

POST /api/v1/mms/datasources/{sourceId}/timers HTTP/1.1

路径参数

名称

类型

必填

描述

示例值

sourceId

integer

数据源 ID

2000015

请求参数

名称

类型

必填

描述

示例值

body

object

请求体参数

sourceId

integer

数据源 ID

2000014

name

string

定时任务名称

planA

srcDbName

string

源库名

src_db

partitions

array

当 type=Partitions 时, 通过该参数指定要迁移表的分区 ID 列表

integer

要迁移表的分区 ID

1232

tables

array

当 type=Tables 时, 通过该参数指定要迁移的表的名称列表

string

要迁移的表的名称

t1

tableBlackList

array

当 type=Database 时, 通过 tableBlackList 指定排除哪些表不迁移

string

当 type=Database 时, 要排除的表

t1

tableWhiteList

array

当 type=Database 时, 指定的要迁移的表列表。如果没有指定 tableWhiteList,则迁移对应 Database 下的所有表

string

当 type=Database 时, 指定的要迁移的表。

t1

partitionFilters

object

分区过滤表达式。 配置指定"表"对应的"分区过滤表达式"

string

分区过滤表达式。例如:p1 >= '2022-03-04' and (p2 = 10 or p3 > 20) and p4 in ('abc', 'cde'),介绍如下:

p1、p2 和 p3 均为分区名。

分区值仅包含字符串和数字,字符串被双引号或单引号包裹。

除 INT 和 BIGINT 类型的分区列值外,其他类型的分区值都只能取字符串值。

比较操作符包括:>、>=、= 、<、<=、<>。

分区过滤表达式支持 IN 操作符。

逻辑操作符包括:AND 和 OR。

支持使用括号。

{ "student": "p1 >= '2022-03-04' and (p2 = 10 or p3 > 20) and p4 in ('abc', 'cde')" }

enableSchemaMigration

boolean

是否迁移表结构

true

enableDataMigration

boolean

是否迁移表数据

true

enableVerification

boolean

开启校验,目前校验方式是在源和目标端执行 select count,对比行数

false

tableMapping

object

源表名->目标名 映射

string

源表名->目标名 映射

{'a': 'a1'}

columnMapping

object

{源列名:目标列名}

string

{源列名:目标列名}

{"c-1": "c_1"}

others

object

其他配置信息

any

其他配置信息

{}

value

string

定时任务调度时间,scheduleType=Daily 时,value=HH:MM,scheduleType=Hourly 时,value=MM

12:00

scheduleType

string

定时任务调度类型

Daily

返回参数

名称

类型

描述

示例值

object

ApiRes

requestId

string

请求 id。

0be3e0b716671885050924814e3623

data

object

返回结果。

timerId

integer

timer id

1

示例

正常返回示例

JSON格式

{
  "requestId": "0be3e0b716671885050924814e3623",
  "data": {
    "timerId": 1
  }
}

错误码

访问错误中心查看更多错误码。

变更历史

更多信息,参考变更详情