Details
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)