更新时间:2023-11-29 GMT+08:00

RawFormDataRequest

表1 RawFormDataRequest

参数

是否必选

参数类型

描述

sourceSelectedDatasource

SourceDatasourceConfig

源端数据源。

targetSelectedDatasource

TargetDatasourceConfig

目标端数据源。

mappingTable

List<MappingTable>

源端与目标端的映射关系。

mappingTableProperties

List<MappTableProperties>

源端与目标端的映射关系特性,关系型数据源使用该属性,其他类型配置为空。

mappingSourceTextOrNot

List<Flag>

源段映射是否为文本,默认值为false。

mappingInput

List<MappingInput>

源端metadata与目标端metadata的映射关系。

mappingRequired

Boolean

是否需要映射关系,默认值为true。

- true (需要)

- false (不需要)

error_handler

List<ErrorHandler>

异常数据存储,需要存储异常数据时配置。

afterImplementation

List<AfterImplementation>

任务完成后执行,根据配置发送消息至Kafka或MRS Kafka。支持提供给第三方平台使用。

表2 MappingTable

参数

是否必选

参数类型

描述

source_column

String

源端表字段的名称。

source_column_type

String

源端表字段的类型。

source_column_length

String

源端表字段的长度。

target_column

String

目标端字段的名称。

target_column_type

String

目标端表字段的类型。

target_column_length

String

目标端表字段的长度。

is_add_mapping

String

是否新增Mapping,默认为false。

表3 KeyValuePair

参数

是否必选

参数类型

描述

keys

String

属性名称。

value

String

属性值。

表4 TargetDatasourceConfig

参数

是否必选

参数类型

描述

targetNeedCreateTable

Boolean

是否自动建表。

当前仅PostgreSQL支持,其他类型数据源暂未开放,为false。

isSupportClearTab

Boolean

是否清空表,开启后每次调度任务会先清空目标端表,默认为false。

数据源为ORACLE配置,默认为false。

数据源为DWS配置,可选true or false。

targetTable

String

目标端表名。

数据源为DWS、ORACLE配置。

target_schema

String

目标端数据库模式,gauss100数据库使用。

batchNumber

String

批次号字段。

选择目标端表中一个字段作为批次号字段,该字段将保存一个随机数,用于标识这一批次的数据。

目标端表中类型为string并且字段长度大于14的字段可以作为批次号字段,且该批次号字段不能和Mapping信息中的目标端字段(target_column)重复。

数据源为DWS、ORACLE配置。

targetSelectedColumnList

List<Column>

目标端选择的字段名列表,数据源为DWS、ORACLE配置。

supportPartUpdate

Boolean

仅更新更改的字段,如果开启此选项,仅更新值有变化的表字段。如果关闭此选项,则更新所有表字段。

数据源为DWS、ORACLE配置。

meta_data

List<MetaData>

数据源的元数据定义对象,仅当“是否解析(is_parse)”选择“是”时需要配置。

对于FTP数据源类型,元数据必须按照文件中的字段顺序填写。

数据源为API、FTP配置。

path

String

文件路径,文件型数据源,为必填项。

write_mode

String

写模式,文件型数据源,为必填项。

file_name_charset

String

文件名称字符编码,数据源为FTP配置。

file_content_type

String

文件内容类型。

当文件内容类型为文本文件时,文件类型为csv or txt, 当文件内容类型为二进制文件时,文件类型为xls or xlsx

- binaryFile (二进制文件)

- textFile (文本文件)

文件型数据源为必填项。

file_type

String

文件类型。

当文件内容类型为文本文件时,文件类型为csv或者txt,

当文件内容类型为二进制文件时,文件类型为xls或者xlsx

文件型数据源为必填项。

file_name_prefix

String

文件名前缀,文件型数据源为必填项。

null_format

String

空格格式符,定义文件中空格的格式。

文件型数据源为必填项。

remark_date_format

String

文件名后缀,文件型数据源为必填项。

add_header

Boolean

是否添加文件头,文件型数据源为必填项。

file_content_charset

String

文件内容字符编码,文件型数据源为必填项。

field_delimiter

String

文件分割符,文件默认以英文逗号","分割。

文件型数据源为必填项。

表5 MappTableProperties

参数

是否必选

参数类型

描述

source_nullable

String

源端表字段是否可为空。

- 0 (不为空)

- 1 (可为空)

source_unique

String

源端表字段是否唯一。

- 0 (唯一)

- 1 (不唯一)

target_nullable

String

目标端表字段是否可为空。

- 0 (不为空)

- 1 (可为空)

target_unique

String

目标端表字段是否唯一。

- 0 (唯一)

- 1 (不唯一)

表6 SourceDatasourceConfig

参数

是否必选

参数类型

描述

need_inc_migration

Boolean

是否增量采集。

数据源为API配置。

- true 采用增量采集

- false 不采用增量采集(每次任务执行都是全量采集)

incr_migration_type

String

增量采集的周期设置类型。

数据源为API配置。

- systemDefault 系统默认

- selfDefine 自定义

advanceStartTime

Integer

开始时间前置值(天),数据源为API时配置。

当incr_migration_type为systemDefault时必须填写。

若源端生成的数据为实时变化的,如告警数据等,可通过前置时间进行采集处理。数据采集的开始时间 = 数据源系统时间 - 时间前置值

period_granularity

String

周期粒度单位,数据源为API时配置。

当incr_migration_type为selfDefine时需填写。

- hour 小时

- day 天

- week 周

- month 月

period_assignment

String

周期指定,数据源为API时配置。

当incr_migration_type为selfDefine时需填写。

- currentPeriod 当前周期

- lastPeriod 上一个周期

period_right_boarder

String

周期右边界,数据源为API时配置。

当incr_migration_type为selfDefine时需填写。

- off 闭区间

- on 开区间

timeZone

String

增量采集时所使用的时区,正常情况填写GMT+08:00,数据源为API配置。

当need_inc_migration为true时必须填写。

dataTimestamp

Integer

增量采集时的初始时间戳,数据源为API时配置。

当need_inc_migration为true时必须填写。

compensation_time

Integer

增量采集时的时间补偿值,数据源为API时配置。

不需要补偿时填0,当need_inc_migration为true时必须填写。

源端生成的数据存在滞后时, 可利用补偿时间进行调整,查询时间范围的结束时间为当前系统时间减去补偿时间。

date_form

String

增量采集时采用的时间格式,数据源为API时配置。

当need_inc_migration为true时必须填写。

isNeedPageSrcApi

Boolean

是否分页查询。

数据源为API配置。

- true 分页查询

- false 不分页查询

pageKeySrcApi

String

分页查询时对应的页码字段名称。

当isNeedPageSrcApi为true时必须填写。

数据源为API配置。

pageSizeKeySrcApi

String

分页查询时对应的分页大小字段名称。

当isNeedPageSrcApi为true时必须填写。

数据源为API配置。

current_page_num

Integer

分页查询页码值,正常情况都填1,当isNeedPageSrcApi为true时必须填写。

数据源为API配置。

page_size

Integer

分页查询每页大小值,当isNeedPageSrcApi为true时必须填写

数据源为API配置。

pageNumLimit

Integer

分页查询时单次任务最大页数限制,不填或填写0时没有限制,否则超过该限制则停止继续查询。

数据源为API配置。

pagingEndType

Boolean

结束分页查询的方式。

数据源为API配置。

- paging-list 分页结果为空 (当分页查询结果为空时,停止查询,默认采用此种方式)

- paging-total 记录总数(当查询的数据量达到了记录总数时停止分页查询,使用此种方式则必须通过pagingEndFieldPath来指定记录总数的key值,此key值由api服务端返回)

pagingEndFieldPath

String

api服务返回的表示总数据量的key值。

pagingEndType为paging-total时必须填写。

数据源为API配置。

beginDateColSrcApi

String

使用增量采集时开始时间的查询key值。

need_inc_migration为true时必须填写。

数据源为API配置。

endDateColSrcApi

String

使用增量采集时结束时间的查询key值。

need_inc_migration为true时必须填写。

数据源为API配置。

sourceParams

List<KeyValuePair>

请求参数的查询参数params。

数据源为API配置。

sourceHeaders

List<KeyValuePair>

请求的headers。

数据源为API配置。

sourceBodyType

String

请求的body类型。

数据源为API配置。

- none

- formData

- x-www-form-urlencoded

- raw-json 默认使用

- raw-sorted-json

- raw-text

bodyRaw

String

请求的body体。

sourceBodyType为raw-json时填写。

数据源为API配置。

sourceBodyFormData

List<KeyValuePair>

请求的form型body体。

sourceBodyType为formData时必填。

数据源为API配置。

sourceResponseType

String

请求响应数据类型。

数据源为API配置。

- json

- xml

isParse

Boolean

是否对请求结果解析。

数据源为API配置。

- true

- false

rootPath

String

解析响应结果的根路径。

数据源为API配置。

sourceMetaData

List<MetaData>

任务源端数据源类型元数据定义。

数据源为API配置。

path

String

文件路径。

FTP服务器中要访问的文件夹路径,例如“/data/FDI”。

file_name

String

文件名。

FTP服务器中要访问的文件。

file_name_charset

String

文件名称字符编码。

数据源为FTP配置。

max_file_size

Integer

最大文件大小,单位MB。

数据源为FTP配置。

file_content_charset

String

文件内容字符编码。

数据源为FTP配置。

field_delimiter

String

文件分割符。

数据源为FTP配置。

null_format

String

空格格式符,定义文件中空格的格式。

数据源为FTP配置。

batch_num

Integer

迁移数量。

是否解析(is_parse)如果选择了是,表示解析的数据行数,最大值为1500000。

是否解析(is_parse)如果选择了否,表示文件数量,最大值为20000

数据源为FTP配置。

skip_header

Boolean

跳过文件头。

当“是否解析”选择“是”时需要配置。

选择是否跳过数据文件中的文件头信息。文件头为添加在文件中的首行或者开头若干行信息,帮助识别和区分文件内容。

数据源为FTP配置。

skip_header_rows

Integer

跳过文件头行数。

数据源为FTP配置。

extend_meta_data

List<MetaData>

任务源端数据源类型元数据定义。

数据源为FTP配置。

instanceId

String

实例ID。

isAddSql

Boolean

是否添加SQL语句,关系型数据库使用。

- true (添加)

- false(不添加)

querySql

String

查询SQL语句,可为空,关系型数据库使用。

sourceTable

String

源端表名,关系型数据库使用。

sourceSchema

String

源端数据库模式,gauss100数据库使用。

sourceSelectedColumnList

List<Column>

源端选择的字段名列表,关系型数据库使用。

orderColumn

String

源端排序的字段名,可为空,关系型数据库使用。

orderType

String

源端排序类型,可为空,关系型数据库使用。

- ASC (升序)

- DESC (降序)

sourceDateColumn

String

源端,增量迁移使用的列名,关系型数据库使用。

need_inc_migration

Boolean

是否增量采集。

关系型数据库使用。

- true 采用增量采集

- false 不采用增量采集(每次任务执行都是全量采集)

timeZone

String

增量采集时所使用的时区, 正常情况填写GMT+08:00,关系型数据库使用。

当need_inc_migration为true时必须填写。

dataTimestamp

Integer

增量采集时的初始时间戳,关系型数据库使用。

当need_inc_migration为true时必须填写。

compensation_time

Integer

增量采集时的时间补偿值,关系型数据库使用。

不需要补偿时填0,当need_inc_migration为true时必须填写。

源端生成的数据存在滞后时, 可利用补偿时间进行调整,查询时间范围的结束时间为当前系统时间减去补偿时间。

where

List<Where>

源端关系型或者Hive类型数据源的过滤条件语句,可为空。

whereOptions

List<WhereOptions>

源端筛选条件,可为空,关系型数据库使用,可筛选类型。

- equal

- notEqual

- less

- lessEqual

- more

- moreEqual

- isNull

- notNull

- between

- notBetween

- inList

- notInList

表7 Flag

参数

是否必选

参数类型

描述

flag

Boolean

是否为文本,默认值为false。

- true (是)

- false (否)

表8 MetaData

参数

是否必选

参数类型

描述

dataSource

List<DataSource>

数据源mapping信息。

表9 Datasource

参数

是否必选

参数类型

描述

index

String

字段索引。

name

String

字段名字。

type

String

字段类型。

format

String

字段格式。

path

String

解析路径。

表10 Column

参数

是否必选

参数类型

描述

field_name

String

字段名。

field_type

String

字段类型。

field_length

String

字段长度。

null_able

String

是否为空。

- 0 (不为空)

- 1 (可为空)

unique

String

是否唯一。

- 0 (唯一)

- 1 (不唯一)

表11 MappingInput

参数

是否必选

参数类型

描述

dataSource

List<DataSource>

数据源mapping信息。

mode

String

内容模式,例如keyvalue。

表12 DataSource

参数

是否必选

参数类型

描述

sourceKey

String

源端值。

targetKey

String

目标端值。

表13 ErrorHandler

参数

是否必选

参数类型

描述

path

String

保存路径。

datasource_id

String

数据源id。

mode

String

数据源类型。

app_id

String

应用ID。

表14 AfterImplementation

参数

是否必选

参数类型

描述

projectId

String

项目ID。

actionType

String

操作类型。

appId

String

应用ID。

datasourceId

String

数据源id。

topic

String

Topic名称。

messageContent

String

自定义消息。