Apache Zeppelin is a web-based notebook for interactive data analytics. Because Hologres is compatible with PostgreSQL, you can connect Apache Zeppelin to Hologres using the JDBC interpreter and run SQL queries directly in a Notebook.
Limits
In the latest version of Apache Zeppelin, the PostgreSQL interpreter has been deprecated and merged into the JDBC interpreter. Use the JDBC interpreter to connect to Hologres. The JDBC interpreter provides the same features as the deprecated PostgreSQL interpreter.
Prerequisites
Before you begin, ensure that you have:
-
An Apache Zeppelin installation. For installation steps, see the Apache Zeppelin documentation.
-
A Hologres instance with a database created. Obtain the network address and port from the Network Information section on the instance details page in the Hologres console.
-
An Alibaba Cloud AccessKey ID and AccessKey secret. See Create an AccessKey pair.
Step 1: Configure the JDBC interpreter
-
Log on to Apache Zeppelin, click your username in the upper-right corner, and select Interpreter from the drop-down list.

-
In the upper-right corner of the page, click +Create. Set Interpreter Name to a short alias for Hologres (for example,
hologres). This alias becomes the%hologresprefix you use to call the interpreter in a Notebook paragraph. Set Interpreter Group to JDBC.
-
Configure the following parameters for the JDBC interpreter. The JDBC URL format is:
Parameter Description default.urlThe JDBC connection URL. Replace {host},{port}, and{database}with the values from your Hologres instance.default.userYour Alibaba Cloud AccessKey ID. default.passwordYour Alibaba Cloud AccessKey secret. jdbc:postgresql://{host}:{port}/{database}For other parameters, see the Apache Zeppelin JDBC interpreter documentation.

-
Click Save at the bottom of the page.
Step 2: Run queries in a Notebook
Create a Notebook and write SQL queries. Prefix each SQL statement with %<interpreter_name> — for example, %hologres — so that Zeppelin routes the query to your Hologres interpreter.
Query results appear at the bottom of the paragraph. Use the display type selector to switch between table, chart, and other visualization formats.