Skip to content

[Optimization][CDCSOURCE] Optimize the way cdcsource parses options #3284

Description

@Zzm0809

Search before asking

  • I had searched in the issues and found no similar optimization requirement.

Description

目前整库同步中连接器的参数在代码中只能解析固定的一些配置, 这样存在用户定义的参数不在处理列表内, 导致参数无法正常传递给连接器, 针对这个问题有以下建议:

  1. 利用反射获取每个连接器的 options 类的每个配置项的 key 形成列表
  2. 拿到用户定义的 配置项列表, 进行匹配
  3. 匹配到的获取用户定义的值
  4. 匹配不到的跳过
  5. 最终将匹配到的所有 参数传递给对应的连接器

基于以上方式可以支持所有连接器的参数解析,而无需手动新增代码解析

简单来说就是:
连接器的所有 options - 用户指定的(包含 dinky 内置的) = 差集 -> 获取用户指定的配置项对应值-> 传给对应连接器

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions