All Products
Search
Document Center

MaxCompute:Connect Tableau to MaxCompute

最終更新日:Nov 08, 2024

You can connect Tableau to a MaxCompute project and configure views, layouts, shapes, and colors in Tableau based on your business requirements to visualize MaxCompute data. The Tableau UI supports drag-and-drop interactions. This topic describes how to use the Java Database Connectivity (JDBC) driver that is provided by MaxCompute to connect Tableau to a MaxCompute project and visualize MaxCompute data on the Tableau UI.

Background information

Tableau Desktop is an application that is developed by the Tableau team based on the breakthrough technologies of Stanford University. You can use Tableau Desktop to analyze structured data and generate charts, coordinate graphs, dashboards, and reports in a few minutes. For more information about Tableau Desktop, see Tableau Desktop.

To use Tableau Desktop to analyze MaxCompute data, you must first connect Tableau to a MaxCompute project by using the MaxCompute JDBC driver. For more information about the MaxCompute JDBC driver, see MaxCompute JDBC.

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 ID and AccessKey secret that are used to access the MaxCompute project are obtained.

    You can obtain the AccessKey ID and AccessKey secret on the AccessKey Pair page.

  • Tableau Desktop 2019.4 or later with a built-in MaxCompute connector is installed.

    For more information about the operating systems that are supported by Tableau Desktop, see Operating systems.

    In this topic, Tableau Desktop 2021.1 is used.

  • The JAR package of MaxCompute JDBC driver V3.0.1 or later is downloaded. The JAR package whose name contains jar-with-dependencies is required. Other packages do not contain complete dependencies.

    In this topic, MaxCompute JDBC driver V3.2.9 is used.

Procedure

Perform the following steps to connect Tableau to your MaxCompute project:

  1. Step 1: Store the MaxCompute JDBC driver in the driver directory

    Store the MaxCompute JDBC driver in the driver directory of Tableau Desktop. The driver is used by Tableau Desktop to access the MaxCompute project.

  2. Step 2: Connect Tableau to the MaxCompute project

    Connect Tableau to the MaxCompute project by configuring connection parameters.

  3. Step 3: Use Tableau to query and analyze data

    Access and visualize data in the MaxCompute project on Tableau Desktop.

Step 1: Store the MaxCompute JDBC driver in the driver directory

Store the downloaded JAR package of the MaxCompute JDBC driver in the driver directory. The driver directory varies based on the operating system:

  • Windows: C:\Program Files\Tableau\Drivers

  • macOS: ~/Library/Tableau/Drivers

  • Linux: /opt/tableau/tableau_driver/jdbc

For more information about how to use the MaxCompute JDBC driver, see JDBC usage notes.

Step 2: Connect Tableau to the MaxCompute project

  1. Start Tableau Desktop.

  2. In the left-side navigation pane, choose More... > Alibaba MaxCompute in the To a Server section.

    Go to the Alibaba MaxCompute dialog box

  3. On the General tab of the Alibaba MaxCompute dialog box, configure the parameters.

    Alibaba MaxCompute

    Parameter

    Description

    Server

    The URL of the MaxCompute project. You must configure this parameter in the format of https://<MaxCompute_endpoint>?project=<MaxCompute_project_name>[&interactiveMode={true|false}], where:

    • <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.

      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.

    Username

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

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

    Password

    The AccessKey secret that corresponds to the AccessKey ID.

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

    Note

    Tableau Desktop 2019.4 does not support AccessKey secrets that end with an equal sign (=). If your AccessKey ID or AccessKey secret contains an equal sign (=), we recommend that you generate a new pair of AccessKey ID and AccessKey secret.

  4. Click Sign in to go to the operation page of Tableau Desktop.

  5. In the left-side navigation pane, select the MaxCompute project from the Database drop-down list. Tableau Desktop automatically connects to the MaxCompute project.

    Select the MaxCompute project

Step 3: Use Tableau to query and analyze data

On the operation page of Tableau Desktop, you can perform the following operations. For more information, see Tableau help.

  • View all tables in the MaxCompute project

    In the left-side navigation pane, select the MaxCompute project from the Database drop-down list. Tableau Desktop automatically loads information about all tables in the MaxCompute project.

    All tables in the MaxCompute project

  • View the schema of a table

    In the Table section, drag the table whose schema you want to view to the upper part on the right side, and click the Icon icon to view the schema of the table.

    View the schema of a table

  • View data in a table

    In the Table section, drag the table whose data you want to view to the upper part on the right side, and click the Icon icon to view data in the table.

    View data in a table

  • Visualize data

    In the lower part of the operation page, click the Create a workbook icon. Then, configure the parameters on the page that appears and visualize data based on your business requirements.

    Visualize data