-
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] parse primary key and schema by historyRecord #1621
[flink] parse primary key and schema by historyRecord #1621
Conversation
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.
Thanks for contributing~ Left some comments.
if (!tableChanges | ||
.get(0) |
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.
Too many tableChanges.get(0).
You can use a variable.
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.
I update it
String id = tableChanges.get(0).get("id").asText(); | ||
String tableName = id.replaceAll("\"", "").split("\\.")[1]; |
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.
I think it's OK to use id
in LOG.debug
.
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.
yes, when I write other PR (#1282), sync multiple mysql database to paimon, we need to distinguish tables with the same name under different databases, so we need to use the format of dbName.tableName
. I will update the format in that PR.
precision, | ||
scale, | ||
MYSQL_CONVERTER_TINYINT1_BOOL.defaultValue()) | ||
.copy(element.get("optional").asBoolean())); |
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.
I'm not familiar with debezium json, I want to know here can we find field comments? If we can, we should also get the comments.
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.
the new version debezium history record contains the table comment and column comment,I add TODO
, when we upgrade to flink cdc 2.4 , we can add the comment
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.
cool~
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.
new version debezium history record also contains the column default value , we can sync it also.
63a6468
to
00defaa
Compare
c4705b4
to
6ad0973
Compare
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.
+1
Purpose
Linked issue: close #1613
Tests
API and Format
Documentation