@@ -418,6 +418,10 @@ private void processCdcRow(SeaTunnelRow row) throws SQLException {
418
418
log .info ("Processing CDC row with kind: {}" , row .getRowKind ());
419
419
420
420
String action = mapRowKindToAction (row .getRowKind ());
421
+ if ("update_before" .equals (action )) {
422
+ log .debug ("UPDATE_BEFORE operation detected, skipping row" );
423
+ return ;
424
+ }
421
425
422
426
if ("delete" .equals (action ) && !allowDelete ) {
423
427
log .debug ("DELETE operation not allowed, skipping row" );
@@ -492,11 +496,9 @@ private String mapRowKindToAction(RowKind rowKind) {
492
496
case UPDATE_AFTER :
493
497
return "update" ;
494
498
case DELETE :
495
- case UPDATE_BEFORE :
496
499
return "delete" ;
497
- default :
498
- return "update" ;
499
500
}
501
+ return "update_before" ;
500
502
}
501
503
502
504
/**
@@ -704,7 +706,7 @@ private void processRow(SeaTunnelRow row) throws SQLException {
704
706
preparedStatement .addBatch ();
705
707
log .info ("Added row to batch, current batch count: {}" , batchCount + 1 );
706
708
}
707
- // 在写入 raw table 后,立即查询验证
709
+
708
710
private void verifyRawTableData (String rawTableName , String database ) throws SQLException {
709
711
try (Statement stmt = connection .createStatement ();
710
712
ResultSet rs =
@@ -722,7 +724,6 @@ private void verifyRawTableData(String rawTableName, String database) throws SQL
722
724
}
723
725
}
724
726
725
- // 打印详细数据
726
727
try (Statement stmt = connection .createStatement ();
727
728
ResultSet dataRs =
728
729
stmt .executeQuery (
@@ -733,7 +734,7 @@ private void verifyRawTableData(String rawTableName, String database) throws SQL
733
734
+ " ORDER BY add_time" ); ) {
734
735
while (dataRs .next ()) {
735
736
log .info (
736
- "Raw data ssj : {}, action: {}, time: {}" ,
737
+ "Raw data : {}, action: {}, time: {}" ,
737
738
dataRs .getString (1 ),
738
739
dataRs .getString (2 ),
739
740
dataRs .getTimestamp (3 ));
0 commit comments