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包:

html 复制代码
source:
  type: mysql
  hostname: xxx
  port: 3306
  username: root
  password: xxx
  tables: adb.\.*,bdb.\.*
  server-id: 6410-6490
  server-time-zone: Asia/Shanghai
  scan.startup.mode: latest-offset

sink:
  type: doris
  fenodes: xxx:8130,xxx:8130,xxx:8130
  username: root
  password: xxx
  table.create.properties.light_schema_change: true

route:
  - source-table: adb.\.*
    sink-table: test_sync.adb_db_<>
    replace-symbol: <>

pipeline:
  name: test_sync
  parallelism: 1

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

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

相关推荐
乐迪信息6 小时前
乐迪信息:AI算法盒子实时识别船舶烟雾与火焰异常
大数据·人工智能·算法·安全·目标跟踪
方向研究7 小时前
日元汇率分析
大数据
数据猿视觉8 小时前
世界杯燃动夏日消费,乐檬软件助力解锁赛事经济新玩法
大数据·人工智能
AI智图坊10 小时前
AIGC赋能跨境电商:如何利用「图生图」与模型提取,破解POD节日款“卡图案”技术瓶颈?
大数据·人工智能·gpt·ai作画·aigc
Java_2017_csdn10 小时前
ComplexKeysShardingAlgorithm 小结
java·大数据·算法
清辞85311 小时前
入门大模型工程师第十课----学习总结
大数据·人工智能·深度学习·学习·语言模型
数字化顾问12 小时前
(115页PPT)数字化工厂项目解决方案(附下载方式)
大数据
明志数科13 小时前
机器人长尾场景数据采集:实操方法论与成本控制
大数据·人工智能
Eileen Seligman13 小时前
0CTF/TCTF 2023 OLAPInfra Nashorn RCE + HDFS UDF RCE
大数据·hadoop·hdfs·ctf·rce
Sonnie0000001(马库斯)13 小时前
【Hadoop之HDFS替换方案】【Haoop远程挂载Cubefs】Cubefs对接Hadoop生态
大数据·hadoop·hdfs