sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject sqoop git commit: SQOOP-1789: Sqoop2: Add validation for partition column when using query based import
Date Mon, 24 Nov 2014 22:07:29 GMT
Repository: sqoop
Updated Branches:
  refs/heads/sqoop2 bb25b8312 -> 6991ff2fb


SQOOP-1789: Sqoop2: Add validation for partition column when using query based import

(Jarek Jarcec Cecho via Abraham Elmahrek)


Project: http://git-wip-us.apache.org/repos/asf/sqoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/sqoop/commit/6991ff2f
Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/6991ff2f
Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/6991ff2f

Branch: refs/heads/sqoop2
Commit: 6991ff2fb417c50b3d68188557fc2d563e1b9f32
Parents: bb25b83
Author: Abraham Elmahrek <abraham@elmahrek.com>
Authored: Mon Nov 24 14:05:28 2014 -0800
Committer: Abraham Elmahrek <abraham@elmahrek.com>
Committed: Mon Nov 24 14:05:28 2014 -0800

----------------------------------------------------------------------
 .../apache/sqoop/connector/jdbc/configuration/FromJobConfig.java  | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/6991ff2f/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/configuration/FromJobConfig.java
----------------------------------------------------------------------
diff --git a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/configuration/FromJobConfig.java
b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/configuration/FromJobConfig.java
index 65e829c..ec1c3b7 100644
--- a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/configuration/FromJobConfig.java
+++ b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/configuration/FromJobConfig.java
@@ -63,6 +63,9 @@ public class FromJobConfig {
       if (config.schemaName != null && config.sql != null) {
         addMessage(Status.ERROR, "Both schema name and SQL cannot be specified");
       }
+      if (config.sql != null && config.partitionColumn == null) {
+        addMessage(Status.ERROR, "Partition column is required on query based import.");
+      }
     }
   }
 }


Mime
View raw message