hailin0 commented on code in PR #6929:
URL: https://github.com/apache/seatunnel/pull/6929#discussion_r1625245315
##########
seatunnel-connectors-v2/connector-cdc/connector-cdc-mysql/pom.xml:
##########
@@ -98,6 +98,11 @@
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
+ <dependency>
+ <groupId>com.github.jsqlparser</groupId>
+ <artifactId>jsqlparser</artifactId>
Review Comment:
Get the full table info from `SourceRecord`
```java
public static TablePath getTablePath(SourceRecord record) {
Struct messageStruct = (Struct) record.value();
Struct sourceStruct =
messageStruct.getStruct(Envelope.FieldName.SOURCE);
String databaseName =
sourceStruct.getString(AbstractSourceInfo.DATABASE_NAME_KEY);
String tableName =
sourceStruct.getString(AbstractSourceInfo.TABLE_NAME_KEY);
String schemaName = null;
if (sourceStruct.schema().field(AbstractSourceInfo.SCHEMA_NAME_KEY)
!= null) {
schemaName =
sourceStruct.getString(AbstractSourceInfo.SCHEMA_NAME_KEY);
}
return TablePath.of(databaseName, schemaName, tableName);
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]