When running Sqoop with the third party DataDirect Oracle JDBC driver to 
extract data; I get the following exception due to the "AS clause" being 
generated by the generic SQL connector which Oracle does not like.

#Sqoop command:
sqoop import --connect 
'jdbc:datadirect:oracle://host:1521;SID=mySID;User=scott;Password=tiger' 
--driver com.ddtek.jdbc.oracle.OracleDriver --table EMP --append -hive-import 
--target-dir /user/hdfs/oracle --hive-table gbir.EMP_DETAILS_V 
--hive-drop-import-delims --hive-overwrite -m 1

#Third party JDBC driver logging of query and exception:
spy>> Connection[1]sql = SELECT t.* FROM EMP AS t WHERE 1=0

spy>> PreparedStatement[1].executeQuery()
spy>> java.sql.SQLException: [DataDirect][Oracle JDBC Driver][Oracle]ORA-00933: 
SQL command not properly ended
ErrorCode=933 SQLState=HY000
java.sql.SQLException: [DataDirect][Oracle JDBC Driver][Oracle]ORA-00933: SQL 
command not properly ended

DataDirect has a developer build to workaround this and we're seeing 2x 
performance increase over native JDBC.  But for a permanent JDBC solution 
beyond Sqoop, I want to see if there is a way to configure either a third party 
JDBC driver or Sqoop to not generate the "AS CLAUSE" in this scenario?

Has anyone else run into this?

Thanks,
Sumit

Reply via email to