0
votes

I've been trying to import a table from Vectorwise to Hive using Sqoop. I downloaded the Vectorwise JDBC driver and all. It just ain't working.

This is the command I'm using: sudo -u hdfs sqoop import --driver com.ingres.jdbc.IngresDriver --connect jdbc:ingres://172.16.63.157:VW7/amit --username ingres -password ingres --table vector_table --hive-table=vector_table --hive-import --create-hive-table -m 1

And I'm getting the error: 12/06/07 22:08:27 ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.RuntimeException: Could not load db driver class: com.ingres.jdbc.IngresDriver java.lang.RuntimeException: Could not load db driver class: com.ingres.jdbc.IngresDriver at com.cloudera.sqoop.manager.SqlManager.makeConnection(SqlManager.java:635) at com.cloudera.sqoop.manager.GenericJdbcManager.getConnection(GenericJdbcManager.java:53) at com.cloudera.sqoop.manager.SqlManager.execute(SqlManager.java:524) at com.cloudera.sqoop.manager.SqlManager.execute(SqlManager.java:547) at com.cloudera.sqoop.manager.SqlManager.getColumnTypesForRawQuery(SqlManager.java:191) at com.cloudera.sqoop.manager.SqlManager.getColumnTypes(SqlManager.java:175) at com.cloudera.sqoop.manager.ConnManager.getColumnTypes(ConnManager.java:263) at com.cloudera.sqoop.orm.ClassWriter.getColumnTypes(ClassWriter.java:1226) at com.cloudera.sqoop.orm.ClassWriter.generate(ClassWriter.java:1051) at com.cloudera.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:84) at com.cloudera.sqoop.tool.ImportTool.importTable(ImportTool.java:370) at com.cloudera.sqoop.tool.ImportTool.run(ImportTool.java:456) at com.cloudera.sqoop.Sqoop.run(Sqoop.java:146) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65) at com.cloudera.sqoop.Sqoop.runSqoop(Sqoop.java:182) at com.cloudera.sqoop.Sqoop.runTool(Sqoop.java:221) at com.cloudera.sqoop.Sqoop.runTool(Sqoop.java:230) at com.cloudera.sqoop.Sqoop.main(Sqoop.java:239)

I'd really appreciate it if someone can help me out here.

Thanks in advance! :)

2

2 Answers

0
votes

I can't comment yet so as an answer:

This is a quote from the documentation:

You can use Sqoop with any other JDBC-compliant database. First, download the appropriate JDBC driver for the type of database you want to import, and install the .jar file in the $SQOOP_HOME/lib directory on your client machine. (This will be /usr/lib/sqoop/lib if you installed from an RPM or Debian package.) Each driver .jar file also has a specific driver class which defines the entry-point to the driver. For example, MySQL’s Connector/J library has a driver class of com.mysql.jdbc.Driver. Refer to your database vendor-specific documentation to determine the main driver class. This class must be provided as an argument to Sqoop with --driver.

Do you have the proper jar file in a directory that's accessible by Sqoop?

For the future it is also always useful if you give a bit more information about your environment like which version of Sqoop you are using etc.

0
votes

Okay, I got it working. It was a simple permission issue. I changed the owner of iijdbc.jar to hdfs.

sudo chown hdfs /usr/lib/sqoop/lib/iijdbc.jar

Now it's working! :)

I can now import my Vectorwise tables to Hive using Sqoop. Great!