Using the Hive IDE

Besides the command-line interface, there are other Integrated Development Environment (IDE) tools available to support Hive. One of the best is Oracle SQL Developer, which leverages the powerful functionalities of the Oracle IDE and is totally free to use. Since Oracle SQL Developer supports general JDBC connections, it is quite convenient to switch between Hive and other JDBC-supported databases in the same IDE. Oracle SQL Developer has supported Hive since v4.0.3. Configuring it to work with Hive is quite straightforward:

  1. Download Oracle SQL Developer (http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html).
  2. Download the Hive JDBC drivers (https://www.cloudera.com/downloads/connectors/hive/jdbc.html).
  3. Unzip the driver file to a local directory.
  4. Start Oracle SQL Developer and navigate to Preferences | Database | Third Party JDBC Drivers.
  5. Add all of the JAR files contained in the unzipped directory to the window, as shown in the following screenshot:
  1. Click on the OK button and restart Oracle SQL Developer.
  2. Create a new connection in the Hive tab, giving the proper Connection Name, UsernamePasswordHost name  (hiveserver2 hostname), Port, and Database. Then, click on the Add and Connect buttons to connect to Hive:

In Oracle SQL Developer, we can run all Hive interactive commands and HQL queries. We can also leverage the wizard of the tool to browse or export data in the Hive tables. Besides Oracle SQL Developer, other database IDEs, such as DBVisualizer (https://www.dbvis.com/) or SQuirrel SQL Client (http://squirrel-sql.sourceforge.net/), can also use the ODBC or JDBC driver to connect to Hive. Hive also has its own built-in web IDE, Hive Web Interface. However, it is not powerful and seldom used. Instead, both Ambari Hive View and Hue (http://gethue.com/) are popular, user-friendly, and powerful web IDEs for the Hadoop and Hive ecosystem. There are more details about using these IDEs in Chapter 10, Working with Other Tools.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.53.119