All Products
Search
Document Center

MaxCompute:Connect Yonghong BI to MaxCompute

Last Updated:Oct 31, 2023

You can connect Yonghong BI to MaxCompute projects. This helps you analyze and visualize data. This topic describes how to connect Yonghong BI to your MaxCompute project and use Yonghong BI to analyze data in a visualized manner.

Background information

Yonghong Desktop is a desktop business intelligence (BI) tool that is used to analyze data. After you install Yonghong Desktop on your on-premises machine, you can directly use this tool without additional deployment. Yonghong Desktop provides end-to-end, agile, and efficient data governance, visualized data analysis, and AI-powered in-depth data analysis. Yonghong Desktop can help you analyze and visualize data. For more information about Yonghong BI, see Yonghong.

Prerequisites

Make sure that the following conditions are met:

  • A MaxCompute project is created.

    For more information about how to create a MaxCompute project, see Create a MaxCompute project.

  • The AccessKey pair of your Alibaba Cloud account that is used to access the MaxCompute project is obtained.

    You can click the profile picture in the upper-right corner of the MaxCompute console and select AccessKey Management to obtain the AccessKey pair.

  • Yonghong Desktop V9.2.2 that has a built-in MaxComnpute connector is installed.

    For more information about how to install and start Yonghong Desktop, see Install Yonghong Desktop.

    Yonghong Desktop V9.2.2 is used in this topic. Yonghong Desktop has a built-in MaxComnpute Java Database Connectivity (JDBC) driver.

  • If the built-in MaxCompute JDBC driver of Yonghong Desktop fails to connect to your MaxCompute project, download the MaxCompute JDBC driver package (V3.2.8 or later) that contains jar-with-dependencies.

    MaxCompute JDBC driver V3.2.9 is used in this topic. For more information about how to add a driver, see the "Add a custom driver" section in this topic.

Step 1: Connect Yonghong BI to the MaxCompute project

  1. Start Yonghong Desktop.

  2. In the left-side navigation pane of Yonghong Desktop, click Create Connection.

  3. On the page that appears, click image.png. In the dialog box that appears, select MaxCompute.

  4. In the Database section, configure connection parameters. The following table describes the parameters.

    配置连接参数

    Parameter

    Description

    Select Connection

    The data source that you want to connect. Select MaxCompute from the drop-down list.

    Driver

    The driver that is used to access the MaxCompute project. Valid values:

    • Default: If you select Default from the drop-down list, the driver com.aliyun.odps.jdbc.OdpsDriver is used. You do not need to change the driver.

    • Custom: You can use a custom driver if the default driver cannot connect to the MaxCompute project. For more information about how to add a custom driver, see the "Add a custom driver" section in this topic.

    URL

    The Uniform Resource Locator (URL) that is used to connect to the MaxCompute project. The format is jdbc:odps:<MaxCompute_endpoint>?project=<MaxCompute_project_name>[&interactiveMode={true|false}]. Delete the angle brackets (<>) when you configure this parameter. Field description:

    • <MaxCompute_endpoint>: required. The endpoint of MaxCompute. Configure this parameter based on the region where the MaxCompute project resides.

      For more information about the endpoints of MaxCompute in different regions, see Endpoints.

    • <MaxCompute_project_name>: required. The name of the MaxCompute project to which you want to connect Tableau.

      This parameter specifies the name of your MaxCompute project instead of the DataWorks workspace to which the MaxCompute project corresponds. You can log on to the MaxCompute console, select the region where your MaxCompute project resides in the top navigation bar, and then view the name of the MaxCompute project on the Project management tab.

    • interactiveMode: optional. This parameter specifies whether to enable the MaxCompute Query Acceleration (MCQA) feature.

      If you want to enable the MCQA feature, add &interactiveMode=true to the end of the URL. For more information about the MCQA feature, see Query acceleration.

    Server Login

    The default value is Username and Password. You do not need to change the value.

    User

    The AccessKey ID that is used to access the MaxCompute project.

    You can obtain the AccessKey ID from the AccessKey Pair page.

    Password

    The AccessKey secret that corresponds to the AccessKey ID.

    You can obtain the AccessKey secret from the AccessKey Pair page.

  5. In the lower part of the Database section, click Test Connection. After the test is successful, save the connection.

    测试连接

Step 2: Use Yonghong BI to query and analyze data

In Yonghong Desktop, you can use the established connection to query and analyze the data of the MaxCompute project. For more information about how to perform these operations, see the Yonghong help information.

  • View all existing tables

    After the data connection is saved, Yonghong Desktop automatically loads information about all existing tables in the MaxCompute project.

    查看所有表
  • Query a table schema

    In the left-side navigation pane of Yonghong Desktop, click Create Data Set and select MaxCompute from the Connection drop-down list. Then, you can use custom SQL scripts to query the schema of a table on the Metadata tab and save the queried dataset.

    查看表结构
  • Query table data

    In the left-side navigation pane of Yonghong Desktop, click Create Data Set and select MaxCompute from the Connection drop-down list. Then, you can use custom SQL scripts to query the data of a table on the Data Details tab and save the queried dataset.

    查看表数据
  • Visualize analysis data

    In the left-side navigation pane of Yonghong Desktop, click Create Dashboard. After a report is generated, select a chart type and configure parameters to visualize data based on your business requirements.

    可视化分析数据

Add a custom driver

Yonghong Desktop has a built-in MaxCompute JDBC driver. If this driver cannot connect to the MaxCompute project, you can add a custom driver by performing the following steps:

  1. Start Yonghong Desktop.

  2. Click the 驱动管理 icon in the upper-left corner of Yonghong Desktop. In the Driver Management dialog box, specify the name of the MaxCompute JDBC driver and upload the JAR package of the MaxCompute JDBC driver, such as odps-jdbc-3.2.9-jar-with-dependencies.jar. Then, click OK.

    添加驱动