The Data Analysis module in DataWorks provides a data visualization tool that displays processed data as intuitive charts, helping you quickly extract key information. This topic demonstrates how to visualize user persona data with DataWorks.
Prerequisite
Before you begin, make sure that you have completed Process data. You must have used Data Studio to process the data and create a basic user persona dataset.
Data analysis scenarios
This example uses Data Analysis to visualize and analyze user persona data for the following scenarios:
Scenario | Example chart |
Ranking of registered users by city |
|
Distribution of member visits by age group |
|
Distribution of member visits by gender |
|
Analysis of visits by gender and zodiac sign |
|
Go to the SQL query page
This example uses the SQL Query feature in DataAnalysis.
Log on to the DataWorks console. In the target region, click in the left-side navigation pane. Click Go to DataAnalysis to open the Data Analysis page. In the left-side navigation pane, click SQL Query.
Configure the SQL query data source
Authorize a Data Source.
You must authorize a data source before using it in Data Analysis. Navigate to the page. Find the desired data source and click Authorization in the Operation column to grant your account the necessary permissions. For more information, see Security Center.
Create a Temporary File.
Method 1: When you access the SQL Query page for the first time or no SQL file is open in the current window, click Create SQL Query to create a Temporary File.
Method 2: If an SQL file is already open, click
to create a Temporary File.
NoteFor more information about creating SQL queries, see SQL query (legacy).
Select a Data Source.
On the temporary file editing page, click the
icon in the upper-right corner, and select the workspace, engine type, and data source for the current SQL query. In this example, a MaxCompute data source is selected.
Write SQL statements
On the Temporary File editing page, enter the following SQL statement and click
to query data from the ads_user_info_1d table. In this example, dt="20241126".
-- If the target partition is not found, you can run show partitions tablename to verify the table partitions.
select * from ads_user_info_1d where dt='business date';View query results and edit charts
After the SQL query returns results, you can click the
button in the left-side navigation pane of the query results to visualize the results. You can also click the
button in the upper-right corner of the chart to open the chart editing page and modify the chart.
Ranking of registered users by city
Double-click the original title above the chart and enter a new title.
Style settings.
Click Style Settings > Change Chart > Stacked Bar Chart on the right side of the page.
Data settings.
Click Data Settings on the left side of the page. Set the X Axis column to count (distinct count), and the Y Axis column to region.
Drag the uid column to X Axis, and in the X Axis drop-down list, select .
Drag the region column to Y Axis.
Modify the axis titles for the X and Y axes.
Click Style Settings on the right side of the page. In Global Settings > Chart Info, click Details and select the Chart Style tab.
Click the axis title for X Axis. In Title Display, configure the X Axis column information and change uid to Registered Members.
Click the axis title for Y Axis. In Title Display, configure the Y Axis column information and change region to Province.
Click the Save button in the upper-right corner to save the chart.
Verify the final chart.
Distribution of member visits by age group
Double-click the original title above the chart and enter a new title.
Style settings.
Click Style Settings > Change Chart > Pie chart on the right side of the page.
Data settings.
Click Data Settings on the left side of the page. Set the category column to age_range and the value column to pv.
Drag the age_range column to Category.
Drag the pv column to Value, and in the Value drop-down list, select .
Click the Save button in the upper-right corner to save the chart.
Verify the final chart.
Distribution of member visits by gender
Double-click the original title above the chart and enter a new title.
Style settings.
Click Style Settings > Change Chart > Pie chart on the right side of the page.
Data settings.
Click Data Settings on the left side of the page. Set the Category column to gender, and the Value column to pv.
Drag the gender column to Category.
Drag the pv column to Value, and in the value drop-down list, select .
Click the Save button in the upper-right corner to save the chart.
Verify the final chart.
Analysis of visits by gender and zodiac sign
Double-click the original title and enter a new title for the chart.
Style settings.
Click Style Settings > Change Chart > Grouped Column Chart on the right side of the page.
Data settings.
Click Data Settings on the left side of the page and configure the column information:
Drag the gender column to X Axis.
Drag the pv column to Y Axis, and in the Y Axis drop-down list, select .
Drag the zodiac column to Split.
Modify the axis titles for the X and Y axes.
Click Style Settings on the right side of the page. In Global Settings > Chart Info, click Details and select the Chart Style tab.
Click the axis title for X Axis. In Title Display, you can configure the X Axis column information and change gender to Gender.
Click the axis title for Y Axis. In Title Display, you can configure the Y Axis column information and change pv to Visits.
Click the Save button in the upper-right corner to save the chart.
Verify the final chart.
Next steps
After you finish editing the chart, click the Save button in the upper-right corner to persist and share the results. To create charts of other styles from the processed data, click the Save As button.
You can view saved charts by clicking the
icon in the left-side navigation pane of the DataAnalysis page.This icon is the dashboard icon in the left-side navigation pane. Example charts include a column chart showing PV distribution by user and a bar chart showing the ranking of registered users by province.



