All Products
Search
Document Center

AnalyticDB:Apache Zeppelin

Last Updated:Apr 29, 2025

Apache Zeppelin is an open source, web-based interactive data analysis tool that supports various data sources, such as MySQL and PostgreSQL. You can use Apache Zeppelin to easily explore and visualize data of different database engines. This topic describes how to use Apache Zeppelin to connect to AnalyticDB for MySQL.

Prerequisites

Procedure

  1. Configure an interpreter.

    1. Access the web page of Apache Zeppelin. In the upper-right corner of the page, click the username and select Interpreter from the drop-down list.

      image

    2. In the upper-right corner of the Interpreters page, click Create and configure the parameters to create an interpreter.

      image

      The following table describes the parameters.

      Parameter

      Description

      Interpreter Name

      The name of the interpreter. You can enter a custom name.

      Interpreter group

      The interpreter group. Set the value to jdbc.

    3. After you set the Interpreter group parameter to jdbc, configure the parameters that are described in the following table.

      Parameter

      Description

      default.url

      The URL that is used to connect to the AnalyticDB for MySQL cluster. Format: jdbc:mysql://VPC or public endpoint:3306.

      • If Apache Zeppelin is installed on an Elastic Compute Service (ECS) instance that resides in the same virtual private cloud (VPC) as the AnalyticDB for MySQL cluster, enter the VPC endpoint.

      • If Apache Zeppelin is installed on an on-premises server, enter the public endpoint.

      default.user

      The name of the database account of the AnalyticDB for MySQL cluster.

      default.password

      The password of the database account of the AnalyticDB for MySQL cluster.

      default.driver

      The MySQL driver. Set the value to com.mysql.jdbc.Driver.

      Dependencies

      The path of the MySQL driver.

      Other parameters

      For information about other parameters, see Apache Zeppelin documentation.

    4. Click Save in the lower part of the page to save the settings.

  2. Create a notebook and execute an SQL statement.

    1. In the top navigation bar, choose Notebook > Create New Note.

    2. In the Create New Note dialog box, configure the parameters that are described in the following table.

      Parameter

      Description

      Note Name

      The name of the notebook. You can enter a custom name.

      Default Interpreter

      The name of the interpreter. Enter the interpreter created in Step 1.

    3. Execute the following SQL statement in the code editor:

      USE adb_demo;
      SHOW TABLES;

      image