From a9e1a859ff649c18787c45d3f71acb87ffaea408 Mon Sep 17 00:00:00 2001 From: SgtBurns Date: Wed, 7 Aug 2024 11:27:12 +0530 Subject: [PATCH] add sslmode for postgress DE-6429 --- .../main/scala/com/razorpay/spark/jdbc/JDBCImport.scala | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sql-delta-import/src/main/scala/com/razorpay/spark/jdbc/JDBCImport.scala b/sql-delta-import/src/main/scala/com/razorpay/spark/jdbc/JDBCImport.scala index 91de01307..e5dd167d4 100644 --- a/sql-delta-import/src/main/scala/com/razorpay/spark/jdbc/JDBCImport.scala +++ b/sql-delta-import/src/main/scala/com/razorpay/spark/jdbc/JDBCImport.scala @@ -141,8 +141,11 @@ class JDBCImport( val schema = importConfig.schema val connectionUrl = s"jdbc:$dbType://$host:$port/$database" - - connectionUrl + if (dbType == Constants.POSTGRESQL) { + s"$connectionUrl?sslmode=disable" + } else { + connectionUrl + } } private lazy val sourceDataframe = readJDBCSourceInParallel()