From 218b8598b1cf65a4add8a3e30e8b36226f7436d7 Mon Sep 17 00:00:00 2001 From: Nicole00 Date: Tue, 23 Aug 2022 10:04:03 +0800 Subject: [PATCH] add configs for oracle --- .../com/vesoft/exchange/common/config/Configs.scala | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/exchange-common/src/main/scala/com/vesoft/exchange/common/config/Configs.scala b/exchange-common/src/main/scala/com/vesoft/exchange/common/config/Configs.scala index 19158584..e04cfa97 100644 --- a/exchange-common/src/main/scala/com/vesoft/exchange/common/config/Configs.scala +++ b/exchange-common/src/main/scala/com/vesoft/exchange/common/config/Configs.scala @@ -572,6 +572,7 @@ object Configs { case "MAXCOMPUTE" => SourceCategory.MAXCOMPUTE case "CLICKHOUSE" => SourceCategory.CLICKHOUSE case "POSTGRESQL" => SourceCategory.POSTGRESQL + case "ORACLE" => SourceCategory.ORACLE case _ => throw new IllegalArgumentException(s"${category} not support") } } @@ -671,6 +672,16 @@ object Configs { config.getString("password"), getOrElse(config, "sentence", null) ) + case SourceCategory.ORACLE => + OracleConfigEntry( + SourceCategory.ORACLE, + config.getString("url"), + config.getString("driver"), + config.getString("user"), + config.getString("passwd"), + config.getString("table"), + getOrElse(config, "sentence", null) + ) case SourceCategory.KAFKA => val intervalSeconds = if (config.hasPath("interval.seconds")) config.getInt("interval.seconds")