By Farah Abdou
Alibaba Cloud QuickBI is one of the most powerful business intelligence platforms in the big data and cloud computing era, which can seamlessly integrate with the comprehensive suite of services provided by Alibaba Cloud. This manual will take you through hands-on implementation of big data visualization solutions using QuickBI along with other Alibaba Cloud services.
Before you begin, ensure that you have the following:
Access to the following Alibaba Cloud services:
Resource Management First step to resource management is to create the resource groups:
Resource Management → Resource Groups → Create Resource Group
Name: quickbi-project
Display Name: QuickBI Project Resources
MaxCompute will be used as your data warehouse:
1. Create a MaxCompute project:
MaxCompute Console → Project List → Create Project
Project Name: quickbi_data_warehouse
Region: Choose your region
Quota Group: Standard
2. Configure security settings:
-- Create a role for QuickBI access
CREATE ROLE quickbi_reader;
-- Grant permissions
GRANT READ ON PROJECT quickbi_data_warehouse TO ROLE quickbi_reader;
Configure the DataWorks workspace:
DataWorks → Workspaces → Create Workspace
Mode: Standard Mode (Development/Production)
QuickBI Console → Data Sources → Add Source
Type: MaxCompute
Project Name: quickbi_data_warehouse
ID: Your AccessKey ID
Key: Your AccessKey Secret
QuickBI Console → Data Sources → Add Source
Type: AnalyticDB for MySQL
Host: your-analyticdb-endpoint.aliyuncs.com
Port: 3306
Database: bi_realtime_data
Username: your_username
Password: your_password
Create a dataset from your MaxCompute table:
Data Sources → MaxCompute → quickbi_data_warehouse
Select Table → Create Dataset
Example MaxCompute SQL for data preparation:
-- Create an optimized table for QuickBI
CREATE TABLE IF NOT EXISTS sales_analysis
(
date_key DATETIME,
product_id STRING,
region_id STRING,
sales_amount DECIMAL(18,2),
quantity INT,
profit DECIMAL(18,2)
)
PARTITIONED BY (dt STRING);
-- Optimize for QuickBI querying
INSERT OVERWRITE TABLE sales_analysis PARTITION (dt='${bizdate}')
SELECT
transaction_date,
product_id,
region_id,
sales_amount,
quantity,
(sales_amount - cost_amount) as profit
FROM raw_sales_data
WHERE transaction_date = '${bizdate}';
Create a sales performance analysis dashboard:
1. Enter:
QuickBI → Workspace → Create → Dashboard
2. Add Alibaba Cloud region-specific map:
{
"chartType": "AlibabaCloudRegionMap",
"dataSource": "sales_analysis",
"dimensions": ["region_id"],
"measures": ["sales_amount", "profit"]
}
Configure in real time, sales monitoring:
1. Configure AnalyticDB connection
2. Create real-time dataset:
-- AnalyticDB table structure
CREATE TABLE realtime_sales (
transaction_id VARCHAR(32),
timestamp DATETIME,
amount DECIMAL(10,2),
product_id VARCHAR(32),
store_id VARCHAR(32)
);
3. Configure auto refresh:
Dashboard Settings → Auto Refresh → Interval: 30 seconds
Blend data from multiple Alibaba Cloud services:
Link QuickBI to DataV for deeper visualizations:
//DataV configuration
{
"dataSource": {
"type": "QuickBI",
"endpoint": "quickbi-api.aliyuncs.com",
"dashboard": "dashboard_id",
"refreshInterval": 300
}
}
Configure sending alerts by Alibaba Cloud MNS:
from aliyunsdkcore.client import AcsClient
from aliyunsdkmns.request.v20150306 import PublishMessageRequest
def send_alert(threshold_breach):
client = AcsClient(access_key_id, access_key_secret, 'region_id')
request = PublishMessageRequest.PublishMessageRequest()
request.set_TopicName('quickbi_alerts')
request.set_MessageBody(f'Alert: {threshold_breach}')
client.do_action_with_exception(request)
Configure RBAC:
{
"Version": "1",
"Statement": [
{
"Effect": "Allow",
"Action": [
"quickbi:Describe*",
"quickbi:Get*",
"quickbi:List*"
],
"Resource": [
"acs:quickbi:*:*:dashboard/*",
"acs:quickbi:*:*:workspace/*"
]
}
]
}
Perform the optimization of your MaxCompute tables:
CREATE TABLE sales_summary_daily
(
date_key DATE,
region_id STRING,
total_sales DECIMAL(18,2),
total_profit DECIMAL(18,2)
)
PARTITIONED BY (region STRING)
CLUSTERED BY (date_key) SORTED BY (date_key) INTO 32 BUCKETS;
Enable the feature of materialized views:
CREATE MATERIALIZED VIEW mv_hourly_sales
REFRESH COMPLETE START EVERY 1 HOUR
AS
SELECT
DATE_FORMAT(timestamp, '%Y-%m-%d %H:00:00') as hour,
store_id,
SUM(amount) as total_amount,
COUNT(*) as transaction_count
FROM realtime_sales
GROUP BY
DATE_FORMAT(timestamp, '%Y-%m-%d %H:00:00'),
store_id;
Integrated usage with PAI (Platform for Artificial Intelligence):
from pai import predict
def custom_forecast(historical_data):
model = pai.load_model('sales_forecast_model')
prediction = model.predict(historical_data)
return prediction
Building an automated refresh workflow:
"type": "DataWorks",
"schedule": {
"cronExpr": "0 0 * * *",
"timezone": "Asia/Shanghai"
},
"tasks": [
{
"name": "refresh_quickbi_dataset",
"type": "QuickBI",
"dashboard": "dashboard_id"
}
]
}
Configure Cloud Monitor for QuickBI:
{
"monitoring": {
"service": "QuickBI",
"metrics": [
"DashboardVisits",
"APILatency",
"DatasetRefreshStatus"
],
"period": 300
}
}
Common problems and solutions:
1. Slow Performing Dashboard
2. Data Refresh Issues
With proper integration with other Alibaba Cloud services, QuickBI provides a powerful platform for big data visualization. This guide will help you unlock the full Alibaba Cloud ecosystem for your business intelligence needs.
Disclaimer: The views expressed herein are for reference only and don't necessarily represent the official views of Alibaba Cloud.
Understanding Alibaba Cloud's Computer Vision and AI Services
6 posts | 0 followers
FollowAlibaba Cloud Community - November 8, 2024
Alibaba Clouder - January 6, 2021
Alibaba Clouder - April 12, 2019
Alibaba Clouder - July 15, 2020
Alibaba Clouder - January 7, 2021
Alibaba Clouder - March 1, 2019
6 posts | 0 followers
FollowAlibaba Cloud provides big data consulting services to help enterprises leverage advanced data technology.
Learn MoreAlibaba Cloud experts provide retailers with a lightweight and customized big data consulting service to help you assess your big data maturity and plan your big data journey.
Learn MoreRealtime Compute for Apache Flink offers a highly integrated platform for real-time data processing, which optimizes the computing of Apache Flink.
Learn MoreA real-time data warehouse for serving and analytics which is compatible with PostgreSQL.
Learn MoreMore Posts by Farah Abdou