欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 文旅 > 艺术 > FlinkCDC 3.2.0 新增优点 Pattern Replacement in routing rules

FlinkCDC 3.2.0 新增优点 Pattern Replacement in routing rules

2024/10/24 6:33:32 来源:https://blog.csdn.net/m0_63628018/article/details/142141383  浏览:    关键词:FlinkCDC 3.2.0 新增优点 Pattern Replacement in routing rules

新增优点:Pattern Replacement in routing rules

flinkcdc 3.2.0版本相较于3.1.0版本,避免了多表多sink多次写 route 路由的麻烦,类似于统一前后缀的形式多表多sink,通过<>正则,大大减少了书写

官网:
Route | Apache Flink CDC
 

Pattern Replacement in routing rules #

If you’d like to route source tables and rename them to sink tables with specific patterns, replace-symbol could be used to resemble source table names like this:

route:- source-table: source_db.\.*sink-table: sink_db.<>replace-symbol: <>description: route all tables in source_db to sink_db

Then, all tables including source_db.XXX will be routed to sink_db.XXX without hassle.
包括source_db.XXX在内的所有表都将毫无麻烦地路由到sink_db.XXX

应用:

flinkcdc版本升级 mysql to doris 在 lib 下添加依赖jar包:

source:type: mysqlhostname: xxxport: 3306username: rootpassword: xxxtables: adb.\.*,bdb.\.*server-id: 6410-6490server-time-zone: Asia/Shanghaiscan.startup.mode: latest-offsetsink:type: dorisfenodes: xxx:8130,xxx:8130,xxx:8130username: rootpassword: xxxtable.create.properties.light_schema_change: trueroute:- source-table: adb.\.*sink-table: test_sync.adb_db_<>replace-symbol: <>pipeline:name: test_syncparallelism: 1

adb会根据route路由规则进行整库同步,bdb则会根据默认的无路由规则进行整库同步。

flinkcdc pipeline 数据库仍然需要在起任务前提前创建好,表则会在source初始阶段自动创建,表注释仍然不生效

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com