0

i am new to pentaho and bigdata......every time i try to connect my windows pentaho to my Linux based virtual machines HDFS..this error pops up..i'v tried a couple of solutions but haven't had any luck with them....i would really appreciate if any of you could come up with a solution... thanks in advance...!!

Error connecting to database [hadoop] :org.pentaho.di.core.exception.KettleDatabaseException: Error occurred while trying to connect to the database

Error connecting to database: (using class org.apache.hadoop.hive.jdbc.HiveDriver) No suitable driver found for jdbc:hive://(virtual machine's ip address):10000/test

usama
  • 1
  • 2

1 Answers1

1

You must have your Hive JDBC driver in classpath. It can be included by extending your CLASSPATH to include the Hive JDBC jar.

set CLASSPATH=%CLASSPATH%;%HIVE_HOME%\lib\hive-jdbc-1.1.0-cdh5.10.1.jar

You should be through if there is no other error!

If you are using a Java application, you can use the following to obtain the connection object : Connection con = DriverManager.getConnection("jdbc:hive2://172.16.149.158:10000/default", "hive", "");

Where 172.16.149.158 is the hive server address, 10000 is the default hive port

Do check if the connection is successful using telnet command..

$ telnet 'hive-server' 'hive-port' It should connect successfully.

You can also use the Pentaho wizard to connect with hive db. Link from Pentaho wiki : http://wiki.pentaho.com/display/BAD/Create+Hive+Database+Connection

Abhay Dandekar
  • 1,230
  • 10
  • 30
  • now this is the error i am getting `Error connecting to database: (using class org.apache.hadoop.hive.jdbc.HiveDriver) invalid database address: jdbc:hive://(virtual machine's ip address):10000/test` – usama Oct 18 '17 at 11:45
  • Updated my answer with the connection string. Do check if you are really able to reach out to your hive server on port 10000. – Abhay Dandekar Oct 18 '17 at 17:01
  • ive tried telnet command on power shell and was successfully able to reach out to my hive server on port 10000....and can you please clarify where should I put the set classpath command and Connection con command? in cmd? or in powershell ? – usama Oct 20 '17 at 06:22
  • Are you creating a new app? Here is a helpful link from Pentaho wiki.. http://wiki.pentaho.com/display/COM/How+to+Configure+Kettle%27s+Spoon+for+a+Pentaho+Solution – Abhay Dandekar Oct 20 '17 at 11:14
  • appreciate it .....no i just want to connect my vm hive database to windows pentaho so i can analyze, and create dashboards.... – usama Oct 20 '17 at 11:17
  • Updated my answer, can you please check if that works for you? – Abhay Dandekar Oct 20 '17 at 11:41
  • i want to confirm that if i open spoon.sh file in notepad++ and add the Connection con = DriverManager.getConnection("jdbc:hive2://172.16.149.158:10000/default", "hive", ""); would it work?? plus where should i put classpath command?? – usama Oct 26 '17 at 11:12
  • @usama .. No it wont work because DriverManager.getConn.... is a java code we use to test JDBC connections. You can use hive's beeline command and specify the connect URL to connect to hive DB. – Abhay Dandekar Oct 28 '17 at 04:52