SET 'execution.checkpointing.interval' = '10s';
EXECUTE PIPELINE WITHYAML (
source:
  type: mysql
  hostname: 152.136.53.49
  port: 3306
  username: root
  password: 'xx-12345'
  tables: test.teachers,test.teacher -- 指定表同步到StarRocks 配合route sink到指定的库表
  server-id: 5400-5404
 
sink:
  type: starrocks
  name: Starrocks Sink
  jdbc-url: jdbc:mysql://127.0.0.1:9030
  load-url: 127.0.0.1:8030
  username: root
  password: 123456
  table.create.properties.replication_num: 1
  --  table.create.properties.fast_schema_evolution: true   starrocks3.2以上支持

route:
  - source-table: test.teachers
    sink-table: ods.teachers
  - source-table: test.teacher
    sink-table: ods.teacher
    description: route all tables in source_db to sink_db

pipeline:
  name: Sync MySQL Database to starrocks Route
  parallelism: 1
)