DataWorks DataAnalysis provides a data visualization tool that you can use to visualize processed data in charts. This helps you quickly extract key information. This topic provides an example on how to use DataWorks to visualize user profile data.
Prerequisites
The required data is processed before you start the example. This means that the data that you want to use for a test is processed into basic user profile data by using DataWorks DataStudio.
Data analysis scenarios
The following table lists the scenarios in which user profile data is visualized and analyzed in this topic.
Scenario | Chart |
Numbers of registered members in different provinces and cities |
|
Distribution of page views of members in different age ranges |
|
Distribution of page views of members by gender |
|
Numbers of page views of members counted by gender and zodiac sign |
|
Go to the SQL Query page
In this example, the SQL query feature of DataAnalysis is used to show how data is visualized.
Log on to the DataWorks console. In the top navigation bar, select the desired region. In the left-side navigation pane, choose . On the page that appears, click Go to DataAnalysis. In the left-side navigation pane of the page that appears, click SQL Query.
Configure a data source for an SQL query
Manage permissions on a data source.
To use a data source in DataAnalysis, you must have the required permissions on the data source. You can perform the following operations to grant your account the required permissions on the data source: Go to the Security Center page and choose . On the page that appears, click the Queryable data source tab, find the data source that you want to query, and then click Authorization in the Actions column. For more information, see Use the data query and analysis control feature.
Create a temporary file.
Method 1: The first time you go to the SQL Query page or if no SQL query file is opened on the page, click Create SQL Query in the right-side area to create a temporary file.
Method 2: If an existing SQL query file is opened, click the
icon to the right of the name of the existing file to create a temporary file.
NoteFor more information about how to create an SQL query file, see SQL query.
Select a data source for the SQL query file.
On the configuration tab of the SQL query file, click the
icon in the upper-right corner to select a workspace, a compute engine type, and a data source for the SQL query file. In this example, a MaxCompute data source is selected.
Write SQL statements
On the configuration tab of the SQL query file, enter the following SQL statement and click the
icon to query data in the ads_user_info_1d table. In this example, data in the dt="20241126" partition is queried.
-- If the desired partition is not found, you can run the show partitions tablename command to view and confirm the table partition.
select * from ads_user_info_1d_odps where dt='Data timestamp';Query results and modify charts
Query results.
You can click the
icon on the left side of the section where the query result is displayed to visualize the query result. 
Modify charts.
Click the
icon in the upper-right corner of the chart to go to the configuration tab of the chart and modify the chart.
What to do next
After you modify the chart, you can click Save in the upper-right corner to permanently save the modification and then share the chart. If you want to visualize processed data by using other types of charts, click Save As.
You can click Cards in the left-side navigation pane of the DataAnalysis page to view the charts on which you perform the save as operation.



