MaxCompute allows you to integrate data from your MaxCompute project with GuanBI. This enables business users and data analysts to perform problem-driven exploratory analysis and create cards and dashboards. This topic describes how to use the MaxCompute JDBC driver to connect GuanBI to a MaxCompute project for visual data analysis.
Background
GuanBI is a comprehensive product suite for agile business intelligence (BI) and intelligent decision-making (AI). It helps enterprises build an intelligent decision-making engine and accelerate the transition from traditional BI to intelligent analysis and decision-making. For more information about GuanBI, see GuanBI.
Prerequisites
Before you begin, make sure that you meet the following requirements:
-
You have created a MaxCompute project.
For more information, see Create a MaxCompute project.
-
You have an AccessKey ID and AccessKey Secret with permissions to access the MaxCompute project.
You can go to the AccessKey Management page to obtain the AccessKey ID and AccessKey Secret.
Procedure
-
Step 1: Configure MaxCompute connection information
Configure connection parameters to connect GuanBI to your MaxCompute project.
-
After you connect to MaxCompute, select the data tables you need.
-
Step 3: Configure data connection and update settings
Configure data update parameters to update data as needed and reduce the load on the data connection.
-
Step 4: Confirm data table information
Confirm your data and its storage location.
-
Step 5: Query and analyze data in GuanBI
Access data from your MaxCompute project in GuanBI and perform visual analysis.
Step 1: Configure MaxCompute connection
-
Log on to the GuanBI service.
-
On the Guanyuan Data page, click Data Center.
-
On the Dataset page, click New Dataset and select Database.
The drop-down menu displays the File, Database, Card, Web Service, stored procedure, and Real-time Dataset options.
-
In the Select Connector pane, select MaxCompute and click Next.
The pane displays various database connector options, such as MySQL, PostgreSQL, Greenplum, SQLServer, Oracle, Presto, Redshift, MaxCompute, Hana, and Teradata.
Step 2: Select data tables
-
In the Select Data Table pane, click New Account. If an account already exists, skip to Step 4.
The Select Account section contains a drop-down list, with the New Account button on the right.
-
In the New Account dialog box, enter the parameters described in the following table.
Parameter
Description
Display name
A descriptive name for the new data connection. Use this name to distinguish between different database connections. For example, enter MaxCompute.
Login ID
The AccessKey ID that has permission to access the MaxCompute project. You can find your AccessKey ID on the AccessKey Management page.
Login key
The AccessKey Secret corresponding to the AccessKey ID. You can find your AccessKey Secret on the AccessKey Management page.
Project name
The name of the MaxCompute project. This is the MaxCompute project name, not the workspace name. To find the project name, log on to the MaxCompute console, switch the region in the top-left corner, and click . The project name is displayed on the Project Management page.
endpoint
The endpoint for MaxCompute. For more information, see Endpoints.
SQL version
MaxCompute supports data type versions 1.0 and 2.0. Select the version based on your requirements. For more information, see Data type versions.
MCQA
Enables or disables the query acceleration feature. To enable query acceleration, set this parameter to yes. GuanBI 4.0 and later versions support MaxCompute query acceleration. For more information about the query acceleration feature, see Query acceleration.
-
After you configure the parameters, click Test Connection to test connectivity.
If a Connection Successful message appears, the connection is successful. If the connection fails, troubleshoot the issue based on the on-screen message or contact GuanBI technical support.
-
From the Select Account drop-down list, select the MaxCompute account that you created.
-
In the Select Data Table section, select the data table to preview and click Preview.
The left pane lists the available data tables. The right side contains the SQL Query area, where you can select a data table to automatically generate a query statement or enter one manually. The Quick Add Time Macro Parameter Selection feature is available at the bottom.
NoteYou can add filter parameters in the data selection section before you click Preview. The system provides filter parameters such as "Yesterday", "Today", and "Last Monday".
-
In the Data Preview dialog box, view the data, and if the data is correct, close Data Preview and click Next.
Step 3: Configure data connection and update settings
-
In the Data Connection and Update Settings pane, configure parameters such as Database Connection Method and Cache Validity Period.
The following table describes the parameters.
Parameter
Description
Database connection method
-
Direct Connection to Database: Directly reads data from MaxCompute using the MaxCompute JDBC driver.
-
Guan-Index: Caches data on the GuanBI server and supports incremental updates. If you select this option, you can specify a primary key to remove duplicate data.
Cache validity period
-
Manual Update: You must manually refresh the data after creating a card.
-
Daily: You can set a specific time (hour and minute) for the daily update.
-
Weekly: You can set a specific day of the week and time (hour and minute) for the weekly update.
-
Monthly: You can set a specific day of the month and time (hour and minute) for the monthly update.
Support real-time card data
Optional. This option refreshes data in real time, increasing the load on the data connection.
-
-
After you configure the parameters, click Next.
Step 4: Confirm data table
-
In the Confirm Data Table Information pane, preview and confirm the selected table and its data. Enter a Dataset Name and select a directory to save the dataset.
The pane displays the field names and data types of the data table and provides the Display Field Name as Field Comment option.
-
After you confirm the data, click Confirm Creation.
Step 5: Query and analyze data in GuanBI
-
On the top menu bar of the GuanBI home page, click Dashboard.
On the Dashboard page, the dashboard list appears on the left, and the main area shows the Overview page.
NoteFor more information about dashboard operations, see GuanBI dashboard design.
-
On the Overview page, click New Card.
-
On the New Card page, select .
-
In the Select Data Table dialog box, select the dataset and click OK.
-
In the card editor, follow these steps:
-
In the Visualization area, select a chart type.
-
From the Dataset area, drag the field that you want to analyze to the Plot area.
-
The Summary Metrics area displays the corresponding data.
The page offers various chart types, such as bar, line, and pie charts. You can configure the analysis by setting dimensions, comparisons, values, filters, and sorting conditions.
-