This topic describes how to use a mainstream third-party tool to connect to MaxCompute Lightning and use MaxCompute Lightning to view tables in a specified MaxCompute project and perform business intelligence (BI) analysis.
- MaxCompute is activated. A MaxCompute project is created.
Before you use MaxCompute Lightning, make sure that a MaxCompute project is created.
If MaxCompute is not activated, you can activate it by following the instructions in Activate MaxCompute and DataWorks.
- A table is created and data is imported into the table.
Before you use MaxCompute Lightning, make sure that a table is created and data is imported into the table. For more information about how to create a table, see Create tables.
- The AccessKey pair of your account is obtained.
Before you use MaxCompute Lightning, make sure that the AccessKey pair of your account is obtained.
To obtain the AccessKey pair, log on to the International site (alibabacloud.com) and click Console in the top navigation bar. In the upper-right corner of the homepage, move the pointer over the profile picture and click AccessKey Management to view the AccessKey pair. If your RAM user does not have permissions to view the AccessKey pair, contact the administrator of your Alibaba Cloud account. You must also make sure that the RAM user is authorized to view the specified table.
Prepare a third-party client tool
MaxCompute Lightning is compatible with PostgreSQL, and all the client tools that support PostgreSQL database connections can be used to connect to MaxCompute Lightning.
This topic describes how to use the BI tool Tableau Desktop to connect to MaxCompute Lightning. You can download the tool package from the Tableau Desktop official website. Other common client tools, such as SQL Workbench/J, PSQL, FineReport, and MicroStrategy, can also be configured to connect to MaxCompute Lightning by using the method described in this topic.
Connect to MaxCompute Lightning and perform BI analysis
After Tableau Desktop is configured and connected to MaxCompute Lightning, you can view tables in the MaxCompute project and perform BI analysis.
- Configure a PostgreSQL database connection.
Start Tableau Desktop. In the left-side navigation pane, choose.
- In the PostgreSQL dialog box, configure the parameters related to the PostgreSQL database
connection and user authentication.
Parameter Description Server The endpoint of MaxCompute Lightning in the specified region. For example, the endpoint of MaxCompute Lightning in the China (Shanghai) region is
lightning.cn-shanghai.maxcompute.aliyun.com. For more information about endpoints, see Endpoints of MaxCompute Lightning.
Port Set this parameter to 443. Database The name of the MaxCompute project. Authentication Select Username and Password from the drop-down list. Username and Password Set the Username parameter to the AccessKey ID and the Password parameter to the AccessKey secret. Require SSL Select Require SSL.
- Obtain information about the tables of the MaxCompute project and create a data source
and its model.
After the table information is configured, Tableau Desktop loads all the tables of the MaxCompute project that is connected. You can select a table to create a model and worksheet based on your business requirements.
Select dimensions and metrics for specific data to create a worksheet.