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

相关推荐
samFuB3 小时前
【实证分析】省级农产品出口技术复杂度数据-含代码(2004-2024年)
大数据
samFuB3 小时前
【数据集】中国31个省农村用电量-含dta及xlsx(1978-2024年)
大数据
成长之路5144 小时前
【数据集】上市公司企业组织惯性数据(2012-2024年)
大数据
Tigerbot6 小时前
虎博科技CEO卢鑫:GEO方法论提出者,AI Marketing 与 AI GEO专家
大数据·人工智能·科技
alxraves7 小时前
医疗器械质量管理体系信息系统的详细设计
大数据·安全·健康医疗·制造
xcbrand7 小时前
快消品品牌策划公司哪家好
大数据·人工智能·python
T06205148 小时前
【实证分析】上市公司企业交易成本数据集-含代码(2000-2024年)
大数据
智慧景区与市集主理人8 小时前
露营设备租赁低效?巨有科技计时租赁系统激活五一增收新动能
大数据·人工智能
@土豆8 小时前
Elasticsearch 9.0.1 集群部署(Docker Compose + k8s 部署方式)
大数据·elasticsearch·docker
醉颜凉8 小时前
Elasticsearch 生产级核心原理:Shard Allocation Awareness 工作机制与实战配置详解
大数据·elasticsearch·搜索引擎