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

相关推荐
华略创新1 小时前
引入外部咨询顾问,提供专业指导——制造企业大型系统项目的明智之选
大数据·制造·crm·erp系统·企业管理软件
时序数据说2 小时前
物联网时序数据管理的利器:为何IoTDB备受青睐?
大数据·数据库·物联网·时序数据库·iotdb
Justin_192 小时前
Linux防火墙firewalld
大数据·linux·运维
Lx3523 小时前
Hadoop数据处理模式:批处理与流处理结合技巧
大数据·hadoop
城管不管3 小时前
搭建分片集群
大数据·数据库
刘一说3 小时前
Elasticsearch启动失败?5步修复权限问题
大数据·elasticsearch·jenkins
刘一说3 小时前
Elasticsearch安装启动常见问题全解析
大数据·elasticsearch·jenkins
一水鉴天4 小时前
整体设计 之 绪 思维导图引擎 之 引 认知系统 之8 之 序 认知元架构 之4 统筹:范畴/分类/目录/条目 之2 (豆包助手 之6)
大数据·架构·认知科学
计算机编程-吉哥6 小时前
大数据毕业设计-基于大数据的健康饮食推荐数据分析与可视化系统(高分计算机毕业设计选题·定制开发·真正大数据)
大数据·毕业设计·计算机毕业设计选题·机器学习毕业设计·大数据毕业设计·大数据毕业设计选题推荐·大数据毕设项目
Apache Flink6 小时前
Flink Agents:基于Apache Flink的事件驱动AI智能体框架
人工智能·flink·apache