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初始阶段自动创建,表注释仍然不生效

相关推荐
汇智信科几秒前
智慧矿山和工业大数据解决方案“安全生产数据综合分析系统
大数据·人工智能·安全·智能算法·智慧矿山·工业大数据·汇智信科
雨大王5125 分钟前
汽车工厂智能调度系统:自适应调度算法如何解决资源与任务匹配难题?
大数据·人工智能·汽车·制造
雨大王51210 分钟前
缩短交付周期:汽车企业如何通过计划智能体实现高效协同?
大数据·人工智能·汽车·制造
专注数据的痴汉24 分钟前
「数据获取」内蒙古地理基础数据(道路、水系、四级行政边界、地级城市、DEM等)
大数据·人工智能·信息可视化
YangYang9YangYan27 分钟前
2026大专大数据专业学习数据分析的价值与应用
大数据·学习·数据分析
Hernon27 分钟前
AI智能体 - 优先级排序
大数据·人工智能
Coder_Boy_1 小时前
基于SpringAI的在线考试系统-AI智能化拓展
java·大数据·人工智能·spring boot
鲨莎分不晴1 小时前
Apache Flume 入门到实战:构建可靠的大数据采集管道
大数据·apache·flume
沃达德软件1 小时前
智慧政工中心功能解析
大数据·数据仓库·数据库开发·数据库架构·etl工程师
babe小鑫1 小时前
大专学历进入快消大厂做终端销售分析的可行性分析
大数据