我用flink-cdc-3.0.1脚本直接提交同步任务,如何只变更目标数据库名称? #3239
Unanswered
zzutligang
asked this question in
Q&A
Replies: 1 comment
-
Hi @zzutligang, currently Flink CDC doesn't support customizing route rules except precise namespace matching, and you may have to write multiple route rules explicitly in YAML config. Regex based auto-renaming feature might be added in a future release, but yet to be available. As a workaround, you may use shell script like this to generate rules automatically: OLD_DATABASE='old_database'
NEW_DATABASE='new_database'
TABLES=(table1 table2 table3 table4)
echo "route:"
for table in "${TABLES[@]}"; do
echo " - source-table: $OLD_DATABASE.$table";
echo " sink-table: $NEW_DATABASE.$table";
done Try replace |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
我需要从mysql把整个数据库里的表和数据同步到doris里。但mysql里数据库名称叫db1,doris里数据库名叫db2,配置脚本里可以写route部分定义源表到目标表的route,但是route规则里指定写源表或则多个源表到具体的某一个目标表(可以带数据库名)。可是我的数据库表很多,总不能全部一行一行的都写出来吧。我只是数据库名不一样,源表名和目标表名都一样,有没有简写的方法啊!谢谢!
Beta Was this translation helpful? Give feedback.
All reactions