Uploaded image for project: 'Sqoop (Retired)'
  1. Sqoop (Retired)
  2. SQOOP-3064

Custom Query with Order by Clause is not working with microsoft sql connector

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      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

      Attachments

        Activity

          People

            Unassigned Unassigned
            senthils Senthil Ganesh
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: