From 8ef873bbf65a91157309280c5ecc852a1ea40ca1 Mon Sep 17 00:00:00 2001 From: Eka Winata Date: Tue, 3 Sep 2024 14:41:57 +0700 Subject: [PATCH] Update regex --- .../dagger/core/sink/kafka/util/SinkKafkaConfigUtil.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dagger-core/src/main/java/com/gotocompany/dagger/core/sink/kafka/util/SinkKafkaConfigUtil.java b/dagger-core/src/main/java/com/gotocompany/dagger/core/sink/kafka/util/SinkKafkaConfigUtil.java index 9cd43b90f..8456ad066 100644 --- a/dagger-core/src/main/java/com/gotocompany/dagger/core/sink/kafka/util/SinkKafkaConfigUtil.java +++ b/dagger-core/src/main/java/com/gotocompany/dagger/core/sink/kafka/util/SinkKafkaConfigUtil.java @@ -8,7 +8,7 @@ import java.util.regex.Pattern; public class SinkKafkaConfigUtil { - private static final Pattern SINK_KAFKA_BUILT_IN_CONFIG_REGEX = Pattern.compile("SINK_KAFKA_BUILT_IN_CONFIG(.*)"); + private static final Pattern SINK_KAFKA_BUILT_IN_CONFIG_REGEX = Pattern.compile("SINK_KAFKA_BUILT_IN_CONFIG_(.*)"); public static Properties parseBuiltInKafkaProperties(Configuration configuration) { Properties properties = new Properties(); @@ -19,7 +19,9 @@ public static Properties parseBuiltInKafkaProperties(Configuration configuration for (String key : builtInKeys) { Matcher matcher = SINK_KAFKA_BUILT_IN_CONFIG_REGEX.matcher(key); if (matcher.find()) { - String kafkaConfigKey = matcher.group(1); + String kafkaConfigKey = matcher.group(1) + .toLowerCase() + .replaceAll("_", "."); properties.setProperty(kafkaConfigKey, configuration.getString(key, "")); } }