In this article, we are going to look at how to download, install and configure DBVisualizer to connect to Hadoop 1.x.
+ Download DB Visualizer for your version of O/S- http://www.dbvis.com/download/
+ Install it
+ Download the follwing Hive Jars (Hadoop 1.x) to a directory on your machine. Unzip the file so you can see all the jars. (hadoop-common.jar, hive-jdbc.jar, httpclient.jar, httpcore.jar, slf4j-api.jar)
+ Open DB Visualizer.
+ Go to Tools --> Driver Manager
+ Set the following options as shown below:
- Driver Name (left panel) to Hive
- Click on the folder (bottom, right) and select ALL the jar files in the Hive Jar Directory (from step above). They will be loaded sequentially – may take a few seconds…
- Set URL format to: jdbc:hive://<yourHiveHostName>:10000/
- Set Driver Class to: org.apache.hadoop.hive.jdbc.HiveDriver
- Close the window.
+ Create a database connection as shown below, by selecting Database à Create Database Connection
+ Name your connection
+ Click on Next.
+ Select your Database driver – Hive
+ Specify an actual Database instance to connect to. The following screenshot shows a connection to a Hive host server (jdbc:hive://<yourHiveHostServer>:10000)
+ Enter the Hadoop / Hive user that has read-access. Password may not be required.
+ Click on Finish.
+ To connect, either click on the + sign by your connection or right-click and select Connect.
+ To create a query, go to SQL Commander à New SQL Commander
+ Enter a statement and test (click on green forward arrow). Don’t forget to qualify your table names with the Database name (for example: talend_pocs.tblpoc9customerprd)