The Hortonworks Community Connection is now live. A completely rebuilt Q&A forum, Knowledge Base, Code Hub and more, backed by the experts in the industry.

You will be redirected here in 10 seconds. If your are not redirected, click here to visit the new site.

The legacy Hortonworks Forum is now closed. You can view a read-only version of the former site by clicking here. The site will be taken offline on January 31,2016

Sqoop Forum

Unable to sqoop data from HDFS to Oracle

  • #30046

    Hi ,
    I am trying to export a file on HDFS to Oracle database using sqoop and getting following error.
    here is my command.
    sqoop export –connect jdbc:oracle:thin:@host:port:SID –username xxxxxx –password xxxxxxx –export-dir /user/faisals/examples/output-data/ –table sqoop_test –input-fields-terminated-by ‘001’ –driver oracle.jdbc.driver.OracleDriver –verbose
    13/07/25 14:51:53 WARN sqoop.ConnFactory: Parameter –driver is set to an explicit driver however appropriate connection manager is not being set (via –connection-manager). Sqoop is going to fall back to org.apache.sqoop.manager.GenericJdbcManager. Please specify explicitly which connection manager should be used next time.
    13/07/25 14:51:53 INFO manager.SqlManager: Using default fetchSize of 1000
    13/07/25 14:51:53 INFO tool.CodeGenTool: Beginning code generation
    13/07/25 14:51:53 DEBUG manager.SqlManager: No connection paramenters specified. Using regular API for making connection.
    13/07/25 14:51:53 DEBUG manager.SqlManager: Using fetchSize for next query: 1000
    13/07/25 14:51:53 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM sqoop_test AS t WHERE 1=0
    13/07/25 14:51:53 ERROR manager.SqlManager: Error executing statement: java.sql.SQLException: ORA-00933: SQL command not properly ended

    java.sql.SQLException: ORA-00933: SQL command not properly ended
    As we can see, sqoop generating a wrong SQL for oracle database not where to drill further.
    In addition, how does sqoop identified column mapping. lik e file on HDFS first column map to abc column in oracle etc?
    Highly appreciate your help..


  • Author
  • #30048

    here is my oracle version & java driver.
    Oracle Database 11g Enterprise Edition Release – 64bit Production
    Note: this driver is working fine with the database from my local machine. and i have placed it under SQOOP_HOME/lib folder i,e. /usr/lib/sqoop/lib


    Here is my sqoop version: Sqoop


    wow this issue is resolved if we remove –driver argument..
    In addition, always mention user and tables upper case to avoid subsequent error
    Have fun :)

The topic ‘Unable to sqoop data from HDFS to Oracle’ is closed to new replies.

Support from the Experts

A HDP Support Subscription connects you experts with deep experience running Apache Hadoop in production, at-scale on the most demanding workloads.

Enterprise Support »

Become HDP Certified

Real world training designed by the core architects of Hadoop. Scenario-based training courses are available in-classroom or online from anywhere in the world

Training »

Hortonworks Data Platform
The Hortonworks Data Platform is a 100% open source distribution of Apache Hadoop that is truly enterprise grade having been built, tested and hardened with enterprise rigor.
Get started with Sandbox
Hortonworks Sandbox is a self-contained virtual machine with Apache Hadoop pre-configured alongside a set of hands-on, step-by-step Hadoop tutorials.
Modern Data Architecture
Tackle the challenges of big data. Hadoop integrates with existing EDW, RDBMS and MPP systems to deliver lower cost, higher capacity infrastructure.