diff --git a/seatunnel-connectors-v2/connector-cdc/connector-cdc-base/src/main/java/org/apache/seatunnel/connectors/cdc/base/utils/SourceRecordUtils.java b/seatunnel-connectors-v2/connector-cdc/connector-cdc-base/src/main/java/org/apache/seatunnel/connectors/cdc/base/utils/SourceRecordUtils.java index 134fec9a1c8..bd4ad3fd588 100644 --- a/seatunnel-connectors-v2/connector-cdc/connector-cdc-base/src/main/java/org/apache/seatunnel/connectors/cdc/base/utils/SourceRecordUtils.java +++ b/seatunnel-connectors-v2/connector-cdc/connector-cdc-base/src/main/java/org/apache/seatunnel/connectors/cdc/base/utils/SourceRecordUtils.java @@ -97,7 +97,8 @@ public static boolean isSchemaChangeEvent(SourceRecord sourceRecord) { public static boolean isDataChangeRecord(SourceRecord record) { Schema valueSchema = record.valueSchema(); Struct value = (Struct) record.value(); - return valueSchema.field(Envelope.FieldName.OPERATION) != null + return valueSchema != null + && valueSchema.field(Envelope.FieldName.OPERATION) != null && value.getString(Envelope.FieldName.OPERATION) != null; }