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

相关推荐
才盛智能科技40 分钟前
K链通×才盛云:自助KTV品牌从0到1孵化超简单
大数据·人工智能·物联网·自助ktv系统·才盛云
广州赛远42 分钟前
IRB2600-201.65特殊机器人防护服清洗工具详解与避坑指南
大数据·人工智能
川西胖墩墩1 小时前
垂直模型价值:专业领域超越通用模型的竞争
大数据·人工智能
Data_Journal2 小时前
如何使用 Python 解析 JSON 数据
大数据·开发语言·前端·数据库·人工智能·php
威胁猎人2 小时前
【黑产大数据】2025年全球KYC攻击风险研究报告
大数据·区块链
迎仔2 小时前
00-大数据技术体系总览:大数据世界的“城市蓝图”
大数据
xixixi777772 小时前
互联网和数据分析中的核心指标 DAU (日活跃用户数)
大数据·网络·数据库·数据·dau·mau·留存率
绝缘体13 小时前
如何使用外卖霸王餐api接口?
大数据·搜索引擎·微信·pygame
幂链iPaaS4 小时前
市场六大专业iPaaS平台怎么选
大数据·人工智能
珠海西格4 小时前
光伏电站全景感知体系:数据采集与设备状态监测技术
大数据·运维·服务器·数据库·人工智能