应用与数据集成平台 ROMA CONNECT-创建普通任务:请求示例

时间:2024-08-14 15:30:04

请求示例

创建一个数据集成普通任务,任务类型为定时,手动配置映射

{
  "task" : {
    "task_name" : "fdi_task_v2mysql-tomysql",
    "task_type" : "TIMING",
    "source_datasource_id" : "30969b205e8f4392a25fb321112d1753",
    "target_datasource_id" : "30969b205e8f4392a25fb321112d1753",
    "description" : "mysql",
    "task_tag" : "fdi_autotest"
  },
  "task_detail" : "{\"sourceSelectedDatasource\":{\"dataTimestamp\":1606807799782,\"isNeedPageSrcApi\":true,\"pageKeySrcApi\":\"pageNum\",\"pageSizeKeySrcApi\":\"pageSize\",\"resultTotalRootPath\":\"\",\"isUseDynamicSignal\":false,\"timeshift\":\"\",\"startTimeKey\":\"\",\"beginDateColSrcApi\":\"beginTime\",\"endDateColSrcApi\":\"endTime\",\"rootPath\":\"\",\"sourceParams\":[{\"keys\":\"pageNum\",\"value\":\"0\"},{\"keys\":\"pageSize\",\"value\":\"10\"},{\"keys\":\"beginTime\",\"value\":\"1\"},{\"keys\":\"endTime\",\"value\":\"1\"}],\"sourceHeaders\":[],\"sourceBodyType\":\"raw-json\",\"bodyRaw\":\"{\\\"pageNum\\\":\\\"1\\\",\\\"pageSize\\\":\\\"10\\\"}\",\"sourceBodyFormData\":[],\"sourceResponseType\":\"json\",\"sourceMetaData\":{\"dataSource\":[{\"index\":0,\"name\":\"name\",\"type\":\"String\",\"format\":\"\",\"path\":\"\"},{\"index\":1,\"name\":\"age\",\"type\":\"Integer\",\"format\":\"\",\"path\":\"\"}],\"mode\":\"keyValue\"},\"incr_migration_type\":\"systemDefault\",\"period_granularity\":\"\",\"period_assignment\":\"\",\"period_right_boarder\":\"\",\"pagingEndType\":\"paging-list\",\"pagingEndFieldPath\":\"\",\"pageNumLimit\":\"1\",\"servicetype\":\"None\",\"current_page_num\":\"1\",\"page_size\":\"10\",\"need_inc_migration\":true,\"date_form\":\"unix_ms\",\"timeZone\":\"GMT+08:00\",\"reset_incr_begin_time\":false,\"compensation_time\":\"0\",\"advanceStartTime\":\"0\",\"advanceStartTimeUnit\":\"day\",\"isParse\":\"true\"},\"targetSelectedDatasource\":{\"targetNeedCreateTable\":false,\"isSupportClearTab\":false,\"targetTable\":\"CDCMODEL.NODE\",\"batchNumber\":\"\",\"targetSelectedColumnList\":[{\"field_name\":\"NODE_ID\",\"field_type\":\"VARCHAR2\",\"field_length\":\"64\",\"null_able\":\"0\",\"unique\":\"1\"},{\"field_name\":\"AVAILABILITY_ZONE\",\"field_type\":\"VARCHAR2\",\"field_length\":\"64\",\"null_able\":\"0\",\"unique\":\"0\"},{\"field_name\":\"CACHE_PORT\",\"field_type\":\"VARCHAR2\",\"field_length\":\"8\",\"null_able\":\"0\",\"unique\":\"0\"},{\"field_name\":\"FLOATING_IP_ADDRESS\",\"field_type\":\"VARCHAR2\",\"field_length\":\"32\",\"null_able\":\"1\",\"unique\":\"0\"},{\"field_name\":\"NAME\",\"field_type\":\"VARCHAR2\",\"field_length\":\"64\",\"null_able\":\"0\",\"unique\":\"0\"},{\"field_name\":\"NODE_TYPE\",\"field_type\":\"VARCHAR2\",\"field_length\":\"255\",\"null_able\":\"0\",\"unique\":\"0\"},{\"field_name\":\"PRIVATE_IP\",\"field_type\":\"VARCHAR2\",\"field_length\":\"32\",\"null_able\":\"1\",\"unique\":\"0\"},{\"field_name\":\"USER_NAME\",\"field_type\":\"VARCHAR2\",\"field_length\":\"64\",\"null_able\":\"1\",\"unique\":\"0\"},{\"field_name\":\"PRIVATE_KEY\",\"field_type\":\"VARCHAR2\",\"field_length\":\"2048\",\"null_able\":\"0\",\"unique\":\"0\"},{\"field_name\":\"ROOT_PASSWORD\",\"field_type\":\"VARCHAR2\",\"field_length\":\"2048\",\"null_able\":\"0\",\"unique\":\"0\"},{\"field_name\":\"SERVER_ID\",\"field_type\":\"VARCHAR2\",\"field_length\":\"64\",\"null_able\":\"0\",\"unique\":\"0\"},{\"field_name\":\"STATUS\",\"field_type\":\"VARCHAR2\",\"field_length\":\"255\",\"null_able\":\"0\",\"unique\":\"0\"},{\"field_name\":\"SUBNET_ID\",\"field_type\":\"VARCHAR2\",\"field_length\":\"64\",\"null_able\":\"0\",\"unique\":\"0\"},{\"field_name\":\"SUBNET_NAME\",\"field_type\":\"VARCHAR2\",\"field_length\":\"256\",\"null_able\":\"1\",\"unique\":\"0\"},{\"field_name\":\"INSTANCE_ID\",\"field_type\":\"VARCHAR2\",\"field_length\":\"64\",\"null_able\":\"1\",\"unique\":\"0\"},{\"field_name\":\"DATAVOLUME_ID\",\"field_type\":\"VARCHAR2\",\"field_length\":\"64\",\"null_able\":\"1\",\"unique\":\"0\"},{\"field_name\":\"CACHE_ROLE\",\"field_type\":\"VARCHAR2\",\"field_length\":\"255\",\"null_able\":\"1\",\"unique\":\"0\"},{\"field_name\":\"RES_SUBNET_IP\",\"field_type\":\"VARCHAR2\",\"field_length\":\"32\",\"null_able\":\"1\",\"unique\":\"0\"},{\"field_name\":\"SYSTEMVOLUME_ID\",\"field_type\":\"VARCHAR2\",\"field_length\":\"64\",\"null_able\":\"1\",\"unique\":\"0\"},{\"field_name\":\"SYSADMIN_PASSWORD\",\"field_type\":\"VARCHAR2\",\"field_length\":\"2048\",\"null_able\":\"1\",\"unique\":\"0\"},{\"field_name\":\"NEW_ROOT_PASSWD\",\"field_type\":\"VARCHAR2\",\"field_length\":\"2048\",\"null_able\":\"1\",\"unique\":\"0\"},{\"field_name\":\"NEW_SYSADMIN_PASSWD\",\"field_type\":\"VARCHAR2\",\"field_length\":\"2048\",\"null_able\":\"1\",\"unique\":\"0\"},{\"field_name\":\"ROOT_PASSWORD_OVERDUE_TIME\",\"field_type\":\"TIMESTAMP(6)\",\"field_length\":\"0\",\"null_able\":\"1\",\"unique\":\"0\"},{\"field_name\":\"OPERATION_MSG\",\"field_type\":\"VARCHAR2\",\"field_length\":\"2048\",\"null_able\":\"1\",\"unique\":\"0\"},{\"field_name\":\"RES_SUBNET_IP_BETA\",\"field_type\":\"VARCHAR2\",\"field_length\":\"32\",\"null_able\":\"1\",\"unique\":\"0\"},{\"field_name\":\"METRIC_DATA\",\"field_type\":\"VARCHAR2\",\"field_length\":\"2048\",\"null_able\":\"1\",\"unique\":\"0\"}],\"supportPartUpdate\":false},\"mappingTable\":[],\"mappingInput\":{\"dataSource\":[{\"sourceKey\":\"name\",\"targetKey\":\"RES_SUBNET_IP_BETA\"},{\"sourceKey\":\"age\",\"targetKey\":\"METRIC_DATA\"}]},\"mappingRequired\":true,\"error_handler\":{\"path\":\"data1\",\"datasource_id\":\"79c4caaa3e1441dfb0351038fcf5f281\",\"mode\":\"OBS\",\"app_id\":\"73965e3c-72b2-40c3-8335-2154ebd6c23a\",\"stop_task_when_obs_failure\":false},\"afterImplementation\":{\"actionType\":\"KAFKA\",\"appId\":\"73965e3c-72b2-40c3-8335-2154ebd6c23a\",\"datasourceId\":\"a87a31a6288e4698865be122ae485dc0\",\"topic\":\"lgytest99\",\"messageContent\":\"success\"}}"
}
support.huaweicloud.com/api-roma/CreateCommonTask.html