diff --git a/debezium-server-iceberg-sink/src/main/java/io/debezium/server/iceberg/IcebergUtil.java b/debezium-server-iceberg-sink/src/main/java/io/debezium/server/iceberg/IcebergUtil.java index e6d5c4c4..b3a2e44b 100644 --- a/debezium-server-iceberg-sink/src/main/java/io/debezium/server/iceberg/IcebergUtil.java +++ b/debezium-server-iceberg-sink/src/main/java/io/debezium/server/iceberg/IcebergUtil.java @@ -65,6 +65,7 @@ public static boolean configIncludesUnwrapSmt() { //@TestingOnly static boolean configIncludesUnwrapSmt(Config config) { + // first lets find the config value for debezium statements ConfigValue stms = config.getConfigValue("debezium.transforms"); if (stms == null || stms.getValue() == null || stms.getValue().isEmpty() || stms.getValue().isBlank()){ return false; @@ -72,11 +73,10 @@ static boolean configIncludesUnwrapSmt(Config config) { String[] stmsList = stms.getValue().split(","); final String regexVal = "^io\\.debezium\\..*transforms\\.ExtractNew.*State$"; - + // we have debezium statements configured! let's check if we have event flattening config is set. for (String stmName : stmsList) { ConfigValue stmVal = config.getConfigValue("debezium.transforms."+stmName+".type"); if (stmVal != null && stmVal.getValue() != null && !stmVal.getValue().isEmpty() && !stmVal.getValue().isBlank() && stmVal.getValue().matches(regexVal)){ - System.out.println(stmVal.getValue()); return true; } }