Uploaded image for project: 'Sqoop (READ-ONLY)'
  1. Sqoop (READ-ONLY)
  2. SQOOP-229

Error - sqoop increment load using "lastmodified" when going against MSSQL

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.0
    • Fix Version/s: 1.4.0
    • Component/s: import
    • Labels:
    • Environment:
      CentOS release 5.6 (Final)

      Description

      We are getting the error below from sqoop when doing an increment load using "lastmodified" when going against MSSQL. I see in the source code for SqlManager.java that the query being used in getCurTimestampQuery() is "select CURRENT_TIMESTAMP()" this is not compatible with MSSQL - for MSSQL it would be just "select
      CURRENT_TIMESTAMP" (keyword not a function).

      Any chance we can add this to the implementation of SQLServerManager.java that is being patched here --> https://issues.cloudera.org/browse/SQOOP-221?

      ---------------------------------

      11/06/23 17:39:08 WARN manager.SqlManager: SQL exception accessing current timestamp: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near ')'.
      11/06/23 17:39:08 ERROR tool.ImportTool: Encountered IOException running import job: java.io.IOException: Could not get current time from database
      at com.cloudera.sqoop.tool.ImportTool.initIncrementalConstraints(ImportTool.java:241)
      at com.cloudera.sqoop.tool.ImportTool.importTable(ImportTool.java:345)
      at com.cloudera.sqoop.tool.ImportTool.run(ImportTool.java:423)
      at com.cloudera.sqoop.Sqoop.run(Sqoop.java:144)

        Attachments

          Activity

            People

            • Assignee:
              patrickangeles Patrick Angeles
              Reporter:
              ken.ernst Ken Ernst
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: