-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[flink] kafka_sync_database supports different prefix and suffix for different db #4704
Conversation
@@ -143,7 +143,8 @@ protected void beforeBuildingSourceSink() throws Exception { | |||
for (JdbcTableInfo tableInfo : jdbcTableInfos) { | |||
Identifier identifier = | |||
Identifier.create( | |||
database, tableNameConverter.convert(tableInfo.toPaimonTableName())); | |||
database, | |||
tableNameConverter.convert("", tableInfo.toPaimonTableName())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
database?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I changed nothing but supply default value for the first argument of the "convert" method.
In this context, the prefix and suffix are not specified by database, so it's ok to provide an empty string as the argument value.
@@ -529,6 +529,7 @@ under the License. | |||
<exclude>release/**</exclude> | |||
<!-- antlr grammar files --> | |||
<exclude>paimon-common/src/main/antlr4/**</exclude> | |||
<exclude>paimon-core/src/test/resources/compatibility/**</exclude> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why add this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If not, the rat-plugin always report license warning when building locally as the following:
[WARNING] Files with unapproved licenses:
paimon-core/src/test/resources/compatibility/datasplit-v1
paimon-core/src/test/resources/compatibility/datasplit-v2
+1 |
Purpose
Linked issue: close #4703
With kafka_sync_database, user can specify different prefix and suffix for different db.
Tests
org.apache.paimon.flink.action.cdc.TableNameConverterTest#testConvertTableNameByDBPrefix_Suffix
API and Format
No
Documentation
Yes and provided.