Hive support JDBC interface, so we can utilize JDBC based SQL client programs such as SQurirrel SQL Client, Eclipse DTD(Data Tools Platform), DBViewer(Eclipse plugin), or even Oracle SQL Developer, to access and execute statements on Hive.
The following wiki page explains that step by step in case of SQurirrel SQL Client
Unlike Oracle, MySQL or other most of databases, Hive JDBC driver is not distributed as a self-contained archive, which means lots of other JAR files are necessary to use it.
Above page doesn't explain exactly what files are necessary. And more, explained way to get those JAR files seems not convenient.
The following article kindly explains exact file set in case of Hive 0.10 but doesn't show how to get those files.
Using Maven's dependency plugin, we can download those necessary JAR files in convenient way.
In case of Hive 0.13,x, following JAR files are necessary to use JDBC connectivity.
commons-configuration-1.10.jar (Apache Commons Configuration)
commons-logging-1.2.jar (Apache Commons Logging)
guava-17.0.jar (Google Guava)
httpcore-4.3.3.jar (Apache HttpComponents Core)
httpclient-4.3.6.jar (Apache HttpComponents Client)
log4j-1.2.17.jar (Apache Log4j)
slf4j-api-1.7.6.jar (SLF4J API)
slf4j-log4j12-1.7.6.jar (SLF4J Log4j Adapter)
The following shell script can be used anywhere just with Maven to get above files.
get goal of dependency plugin can be executed without pom file, so you just need the following script.
The local location to save the downloaded files can be specified by the value of
-Ddest option of the
mvn command-line in the script.
For Windows, you can use the following batch script.