Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Sqoop >> mail # user >> Oracle Synonym import error


+
Vikash Talanki -X 2013-08-16, 18:44
Copy link to this message
-
Re: Oracle Synonym import error
Hi Vikash,
what Sqoop version are you using?

Jarcec

On Fri, Aug 16, 2013 at 06:44:32PM +0000, Vikash Talanki -X (vtalanki - Infosys Limited at Cisco) wrote:
> Hi ,
>
> I am trying to import a synonym from oracle. I have gone through the latest PDF available on sqoop and trying to import  synonym by below query :
>
> sqoop import \
> --connect jdbc:oracle:thin:@173.36.136.11:1521/afprod.cisco.com \
> --username NAI_DATA \
> --password nai_data \
> -m 1 \
> --table NITA_CNTRCT_MON_PRICE \
> --hive-import --hive-table nita_rcc.nita_cntrct_mon_price_synonym_test \
> --driver oracle.jdbc.OracleDriver \
> --connection-manager org.apache.sqoop.manager.GenericJdbcManager
>
> But when I do this I am getting the below exception :
>
> [dev@TSPM-SJ-ED1 ~]$ sqoop import --connect jdbc:oracle:thin:@173.36.136.11:1521/afprod.cisco.com --username NAI_DATA --password nai_data -m 1 --table NITA_CNTRCT_MON_PRICE --hive-import --hive-table nita_rcc.nita_cntrct_mon_price_synonym_test --driver oracle.jdbc.OracleDriver --connection-manager org.apache.sqoop.manager.GenericJdbcManager
> 13/08/16 11:18:21 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
> 13/08/16 11:18:21 INFO tool.BaseSqoopTool: Using Hive-specific delimiters for output. You can override
> 13/08/16 11:18:21 INFO tool.BaseSqoopTool: delimiters with --fields-terminated-by, etc.
> 13/08/16 11:18:21 INFO manager.SqlManager: Using default fetchSize of 1000
> 13/08/16 11:18:21 INFO tool.CodeGenTool: Beginning code generation
> 13/08/16 11:18:22 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM NITA_CNTRCT_MON_PRICE AS t WHERE 1=0
> 13/08/16 11:18:22 ERROR manager.SqlManager: Error executing statement: java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly ended
>
> java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly ended
>
>         at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:91)
>         at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
>         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)
>         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
>         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
>         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1034)
>         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)
>         at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:791)
>         at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:866)
>         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)
>         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3387)
>         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3431)
>         at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1491)
>         at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:487)
>         at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:496)
>         at org.apache.sqoop.manager.SqlManager.getColumnTypesForRawQuery(SqlManager.java:194)
>         at org.apache.sqoop.manager.SqlManager.getColumnTypes(SqlManager.java:178)
>         at org.apache.sqoop.manager.ConnManager.getColumnTypes(ConnManager.java:114)
>         at org.apache.sqoop.orm.ClassWriter.getColumnTypes(ClassWriter.java:1235)
>         at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1060)
>         at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:82)
>         at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:367)
>         at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:453)
>         at org.apache.sqoop.Sqoop.run(Sqoop.java:145)
>         at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
+
Vikash Talanki -X 2013-08-25, 07:06
+
Jarek Jarcec Cecho 2013-08-25, 16:12
+
Vikash Talanki -X 2013-08-25, 16:29
+
Jarek Jarcec Cecho 2013-08-25, 17:00