flink-cdc
flink-cdc copied to clipboard
[FLINK-35647][route] Allow symbol replacement to simplify routing rules
This closes FLINK-35647, inspired by #2908 and #2947. Credit goes to @icchux and @WholeWorld-Timothy.
Currently, we must provide explicit sink-table in pipeline route rules, which means if we'd like to route all tables in specific database and change names in pattern, there's no choice but write all rules separately, which is a chore.
This PR allows specifying a special "replacement symbol" to resemble original table name in route rules like this:
route:
- source-table: db.\.*
sink-table: new_db.<>
replace-symbol: <>
Now, <> will be replaced by upstream table name, so any tables like db.tableX will be routed to new_db.tableX automatically.