hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From unmesha sreeveni <unmeshab...@gmail.com>
Subject Re: Sqoop command syntax
Date Tue, 29 Jul 2014 08:51:01 GMT
Try this

sqoop import \

--connect jdbc:oracle:thin:@myoracleserver.com:1521/mysid \

--table mytab1 \

--username
​ ​
scott --password
​ ​
tiger



On Tue, Jul 29, 2014 at 2:11 PM, R J <rj201244@yahoo.com> wrote:

> Hi All,
>
> Could anyone please help me with the Sqoop command syntax? I tried the
> following command:
>
> /home/logger/scoop/sqoop-1.4.4.bin__hadoop-0.20/bin/sqoop import --driver
> oracle.jdbc.driver.OracleDriver --connect
> jdbc:oracle:thin:@myoracleserver.com:1521/mysid --username scott
> --password tiger --table mytab1
>
> I get the error:
> 14/07/29 08:26:23 INFO manager.SqlManager: Executing SQL statement: SELECT
> t.* FROM mytab1 AS t WHERE 1=0
> 14/07/29 08:26:24 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.T4CTTIoer.processError(T4CTTIoer.java:447)
>         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
>         at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:951)
>         at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:513)
>         at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:227)
>         at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
>         at
> oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:208)
>         at
> oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:886)
>         at
> oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1175)
>         at
> oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1296)
>         at
> oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3613)
>         at
> oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3657)
>         at
> oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1495)
>         at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:674)
>         at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:683)
>         at
> org.apache.sqoop.manager.SqlManager.getColumnTypesForRawQuery(SqlManager.java:240)
>         at
> org.apache.sqoop.manager.SqlManager.getColumnTypes(SqlManager.java:223)
>         at
> org.apache.sqoop.manager.ConnManager.getColumnTypes(ConnManager.java:347)
>         at
> org.apache.sqoop.orm.ClassWriter.getColumnTypes(ClassWriter.java:1277)
>         at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1089)
>         at
> org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:96)
>         at
> org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:396)
>         at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:502)
>         at org.apache.sqoop.Sqoop.run(Sqoop.java:145)
>         at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
>         at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:181)
>         at org.apache.sqoop.Sqoop.runTool(Sqoop.java:220)
>         at org.apache.sqoop.Sqoop.runTool(Sqoop.java:229)
>         at org.apache.sqoop.Sqoop.main(Sqoop.java:238)
> 14/07/29 08:26:24 ERROR tool.ImportTool: Encountered IOException running
> import job: java.io.IOException: No columns to generate for ClassWriter
>         at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1095)
>         at
> org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:96)
>         at
> org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:396)
>         at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:502)
>         at org.apache.sqoop.Sqoop.run(Sqoop.java:145)
>         at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
>         at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:181)
>         at org.apache.sqoop.Sqoop.runTool(Sqoop.java:220)
>         at org.apache.sqoop.Sqoop.runTool(Sqoop.java:229)
>         at org.apache.sqoop.Sqoop.main(Sqoop.java:238)
>
>
>


-- 
*Thanks & Regards *


*Unmesha Sreeveni U.B*
*Hadoop, Bigdata Developer*
*Center for Cyber Security | Amrita Vishwa Vidyapeetham*
http://www.unmeshasreeveni.blogspot.in/

Mime
View raw message