Senthil Ganesh created SQOOP-3064: ------------------------------------- Summary: Custom Query with Order by Clause is not working with microsoft sql connector Key: SQOOP-3064 URL: https://issues.apache.org/jira/browse/SQOOP-3064 Project: Sqoop Issue Type: Bug Reporter: Senthil Ganesh
016-10-17 12:43:57 <TASK_140070035572480-MAPPING> INFO: [APPSDK_Msg_1762] BoundingValsQuery: SELECT MIN(EMPNO), MAX(EMPNO) FROM (SELECT DISTINCT "dbo"."EMP_TGT"."EMPNO","dbo"."EMP_TGT"."ENAME","dbo"."EMP_TGT"."JOB","dbo"."EMP_TGT"."MGR","dbo"."EMP_TGT"."HIREDATE","dbo"."EMP_TGT"."SAL","dbo"."EMP_TGT"."COMM","dbo"."EMP_TGT"."DEPTNO" FROM "dbo"."EMP_TGT" where (1 = 1) ORDER BY "dbo"."EMP_TGT"."ENAME" ASC) AS t1 2016-10-17 12:43:57 <TASK_140070035572480-MAPPING> INFO: [APPSDK_Msg_1762] Cleaning up the staging area /tmp/hadoop-yarn/staging/adpqa/.staging/job_1474990333046_0695 2016-10-17 12:43:57 <TASK_140070035572480-MAPPING> INFO: [APPSDK_Msg_1762] PriviledgedActionException as:adpqa (auth:PROXY) via adpqa (auth:KERBEROS) cause:java.io.IOException: com.microsoft.sqlserver.jdbc.SQLServerException: The ORDER BY clause is invalid in views, inline functions, derived tables, subqueries, and common table expressions, unless TOP, OFFSET or FOR XML is also specified. 2016-10-17 12:43:57 <TASK_140070035572480-MAPPING> INFO: [APPSDK_Msg_1762] Encountered IOException running import job: java.io.IOException: com.microsoft.sqlserver.jdbc.SQLServerException: The ORDER BY clause is invalid in views, inline functions, derived tables, subqueries, and common table expressions, unless TOP, OFFSET or FOR XML is also specified. 2016-10-17 12:43:57 <TASK_140070035572480-MAPPING> INFO: [APPSDK_Msg_1762] at org.apache.sqoop.mapreduce.db.DataDrivenDBInputFormat.getSplits(DataDrivenDBInputFormat.java:203) 2016-10-17 12:43:57 <TASK_140070035572480-MAPPING> INFO: [APPSDK_Msg_1762] at org.apache.hadoop.mapreduce.JobSubmitter.writeNewSplits(JobSubmitter.java:305) 2016-10-17 12:43:57 <TASK_140070035572480-MAPPING> INFO: [APPSDK_Msg_1762] at Thanks & Regards, Rohith -- This message was sent by Atlassian JIRA (v6.3.4#6332)