Connect Oracle SQL Developer to Hive
Oracle SQL Developer is one of the most common SQL client tool that is used by Developers, Data Analyst, Data Architects etc for interacting with Oracle and other relational systems. So extending the functionality of SQL developer to connect to hive is very useful for Oracle users.
I found this original article on oracle’s website and made some additions based upon the issues that I ran into. Here is the original link
Oracle SQL Developer support for Hive
Here are the steps that i followed
Step1) For the latest version of SQL developer you would need JDK 1.8 so you would need to install that on your mac and also change the JAVA_HOME path so that it points to JDK 1.8.
Step2) Download the latest version of Oracle SQL developer for mac, from oracle and unzip it
Move the SQL Developer file to your application, so that it is available for you. Now when you try to open up Oracle SQL developer on mac, it may not open. For me it showed up in the tray, blinked for a while and then gone. So I had to follow this instruction to fix it
Fix for Mac SQL Developer setup
Once you have this fix then you should be able to open the Oracle SQL developer.
Step3) Need to download JDBC driver for Hive that can work with Oracle SQL Developer. Cloudera has one available and here it he link for it
Link for Hive JDBC Driver for Oracle SQL Developer
Step4) Unzip the downloaded file from step3. There will be another zip file you will find called “Cloudera_HiveJDBC4_2.5.15.1040.zip”. Unzip that file as well and move all the jars to
<your home directory>/.sqldeveloper/
ql.jar
hive_service.jar
hive_metastore.jar
TCLIServiceClient.jar
zookeeper-3.4.6.jar
slf4j-log4j12-1.5.11.jar
slf4j-api-1.5.11.jar
log4j-1.2.14.jar
libthrift-0.9.0.jar
libfb303-0.9.0.jar
HiveJDBC4.jar
Step5) Add these jars to SQL developer
Go “Oracle SQL Developer” --> Preferences
Select Database and then “Third Party JDBC Drivers” and use add entry option to add the jar files mentioned in steps above.
Restart the SQL developer to reflect this change.
Step6) Open SQL developer and right click on connections to add a connection. Select the hive tab, enter your hive server details and Add that connection.
You are all set to browse Hive tables via SQL Developer

