sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From venkatran...@apache.org
Subject sqoop git commit: SQOOP-3138: Netezza Direct Import does not support --columns options (Suraj Nayak via Venkat Ranganathan)
Date Thu, 23 Feb 2017 16:06:29 GMT
Repository: sqoop
Updated Branches:
  refs/heads/trunk 24d08185c -> d8c4b3ccd


SQOOP-3138: Netezza Direct Import does not support --columns options
   (Suraj Nayak  via Venkat Ranganathan)


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

Branch: refs/heads/trunk
Commit: d8c4b3ccdd06c5e300e4552b962e97c714651797
Parents: 24d0818
Author: Venkat Ranganathan <venkat@hortonworks.com>
Authored: Thu Feb 23 08:06:16 2017 -0800
Committer: Venkat Ranganathan <venkat@hortonworks.com>
Committed: Thu Feb 23 08:06:16 2017 -0800

----------------------------------------------------------------------
 .../mapreduce/db/netezza/NetezzaExternalTableImportMapper.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/d8c4b3cc/src/java/org/apache/sqoop/mapreduce/db/netezza/NetezzaExternalTableImportMapper.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/sqoop/mapreduce/db/netezza/NetezzaExternalTableImportMapper.java
b/src/java/org/apache/sqoop/mapreduce/db/netezza/NetezzaExternalTableImportMapper.java
index 2efea53..0b4b134 100644
--- a/src/java/org/apache/sqoop/mapreduce/db/netezza/NetezzaExternalTableImportMapper.java
+++ b/src/java/org/apache/sqoop/mapreduce/db/netezza/NetezzaExternalTableImportMapper.java
@@ -80,7 +80,7 @@ public abstract class NetezzaExternalTableImportMapper<K, V> extends
     int errorThreshold = conf.getInt(
       DirectNetezzaManager.NETEZZA_ERROR_THRESHOLD_OPT, 1);
     String logDir = conf.get(DirectNetezzaManager.NETEZZA_LOG_DIR_OPT);
-    String[] cols = dbc.getOutputFieldNames();
+    String[] cols = dbc.getInputFieldNames();
     String inputConds = dbc.getInputConditions();
     StringBuilder sqlStmt = new StringBuilder(2048);
 
@@ -125,7 +125,7 @@ public abstract class NetezzaExternalTableImportMapper<K, V> extends
       sqlStmt.append('*');
     } else {
       sqlStmt.append(cols[0]).append(' ');
-      for (int i = 0; i < cols.length; ++i) {
+      for (int i = 1; i < cols.length; ++i) {
         sqlStmt.append(',').append(cols[i]);
       }
     }


Mime
View raw message