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

相关推荐
长谷深风11111 分钟前
AI自动化中的关键闸门:何时必须人工审批?
大数据·人工智能·ai·自动化·ai agent·智能体·hitl
天辛大师39 分钟前
天辛大师谈AI时代的沉思录,All in AI 持续做事与放大效应
大数据·人工智能·随机森林·重构·启发式算法
智码看视界44 分钟前
大数据架构深度解析:StarRocks 实时数仓搭建:比 ClickHouse 更适合多维分析的场景
大数据·starrocks·olap·数据建模·列式存储·clickhouse对比
韦韦(Carina)1 小时前
技术博客结构化:让 AI 准确引用你的 7 条排版铁律
大数据·人工智能
IT毕设实战小研1 小时前
基于大数据处理的京东商品销售态势分析与可视化设计
大数据·科技·机器学习·信息可视化·数据分析
一比七品牌咨询1 小时前
科技企业品牌定位:如何把技术优势转化为品牌优势?
大数据·人工智能·品牌策划·品牌全案策划·深圳品牌策划公司·品牌定位
QQ_21696290961 小时前
基于微服务架构的店铺管理系统的设计与实现
大数据·spring boot·后端·spring·微服务·小程序·架构
starzy19901 小时前
Flink TimeWindow 详解及代码实现:从三种时间语义到滚动与滑动窗口
java·服务器·flink
cspttty2 小时前
2026年财务分析岗JD中的Excel、SQL、BI与业务分析要求
大数据·sql·excel
clz13145212 小时前
风险特征平台架构设计与实现
java·flink