Apache Zeppelin Component Guide
Also available as:
PDF
loading table of contents...

Using the %jdbc Interpreter to Access Hive

The %jdbc interpreter supports access to Apache Hive data. The interpreter connects to Hive via Thrift.

If you want Hive queries to run under the user ID originating the query, see Configuring User Impersonation for Access to Hive.

To use the JDBC interpreter to access Hive:

  1. Add the following directive at the start of a paragraph:

    %jdbc(hive)

  2. Next, add the query that accesses Hive.

Here is a sample paragraph:

%jdbc(hive)
SELECT * FROM db_name;

If you receive an error, you might need to complete the following two additional steps:

  1. Copy Hive jar files to /usr/hdp/current/zeppelin-server/interpreter/jdbc (or create a soft link).

  2. On the Interpreters page in the Zeppelin Web UI, restart the JDBC interpreter.