gobblin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [2/3] incubator-gobblin git commit: updating connection url for sqlserver with database name
Date Sat, 29 Jul 2017 02:41:45 GMT
updating connection url for sqlserver with database name


Project: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/commit/35602e7b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/tree/35602e7b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/diff/35602e7b

Branch: refs/heads/master
Commit: 35602e7b8e7bf488eb77b36fe960e5fbccf71cef
Parents: d0fb9ad
Author: Arjun <abora@linkedin.com>
Authored: Tue Jul 25 13:59:00 2017 -0700
Committer: Arjun <abora@linkedin.com>
Committed: Tue Jul 25 13:59:00 2017 -0700

----------------------------------------------------------------------
 .../src/main/java/gobblin/source/jdbc/SqlServerExtractor.java     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-gobblin/blob/35602e7b/gobblin-modules/gobblin-sql/src/main/java/gobblin/source/jdbc/SqlServerExtractor.java
----------------------------------------------------------------------
diff --git a/gobblin-modules/gobblin-sql/src/main/java/gobblin/source/jdbc/SqlServerExtractor.java
b/gobblin-modules/gobblin-sql/src/main/java/gobblin/source/jdbc/SqlServerExtractor.java
index fa502d4..4a731e3 100644
--- a/gobblin-modules/gobblin-sql/src/main/java/gobblin/source/jdbc/SqlServerExtractor.java
+++ b/gobblin-modules/gobblin-sql/src/main/java/gobblin/source/jdbc/SqlServerExtractor.java
@@ -188,7 +188,8 @@ public class SqlServerExtractor extends JdbcExtractor {
     String host = this.workUnitState.getProp(ConfigurationKeys.SOURCE_CONN_HOST_NAME);
     String port = this.workUnitState.getProp(ConfigurationKeys.SOURCE_CONN_PORT);
     String database = this.workUnitState.getProp(ConfigurationKeys.SOURCE_QUERYBASED_SCHEMA);
-    String url = "jdbc:sqlserver://" + host.trim() + ":" + port + ";databaseName=" + database.trim();
+    String url = "jdbc:sqlserver://" + host.trim() + ":" + port +
+        (StringUtils.isEmpty(database) ? "" : (";databaseName=" + database.trim()));
     return url;
   }
 


Mime
View raw message