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

Could not get current time from database - DB2 database

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 1.4.3
    • None
    • sqoop2-jdbc-connector
    • None
    • Linux, DB2 v10.5.0, IBM BigInsights v3.2.0

    Description

      Dear Team,
      I am facing below issue when executing below sqoop command to do incremental import to BigSQL table.
      Command:
      ------------
      ./sqoop import --driver com.ibm.db2.jcc.DB2Driver --connect jdbc:db2://localhost:50000/sample --username xxxx --password xxxx --table student --incremental lastmodified --check-column ts --target-dir /sqooptest/db/student --last-value '2016-07-21-14.41.43'

      And got these lines when checking java SqlManager file. Is this method return query compatible with DB2?.
      FileName: org.apache.sqoop.manager.SqlManager
      protected String getCurTimestampQuery()

      { return "SELECT CURRENT_TIMESTAMP()"; }

      16/07/21 15:43:41 WARN manager.SqlManager: SQL exception accessing current timestamp: com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-104, SQLSTATE=42601, SQLERRMC=(;CT CURRENT_TIMESTAMP;<table_expr>, DRIVER=3.66.46
      16/07/21 15:43:41 ERROR tool.ImportTool: Encountered IOException running import job: java.io.IOException: Could not get current time from database at org.apache.sqoop.tool.ImportTool.initIncrementalConstraints(ImportTool.java:284)
      at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:398)

      Attachments

        Activity

          People

            Unassigned Unassigned
            mmohammedniaz Mohammed Niaz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: