All Products
Search
Document Center

DataWorks:Visualize data

Last Updated:Dec 01, 2025

The DataAnalysis module in DataWorks provides a data visualization tool that displays processed data in charts to help you quickly extract key information. This topic uses an example to demonstrate how to visualize user persona data in DataWorks.

Prerequisites

Before you begin, make sure that you have processed the data using DataWorks DataStudio to transform the data into basic user persona data.

Use cases

This example visualizes and analyzes user persona data for the following scenarios:

Scenario

Chart

Numbers of registered members in different provinces and cities

image.png

Distribution of member page views by age

image.png

Distribution of page views of members by gender

image.png

Numbers of page views of members counted by gender and zodiac sign

image.png

Go to the SQL Query page

This example uses the SQL Query feature in DataAnalysis.

Log on to the DataWorks console. In the top navigation bar, select the desired region. In the left-side navigation pane, choose Data Analysis and Service > DataAnalysis. 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

  1. Grant permissions on a Data Source.

    Before you can use a data source in DataAnalysis, you must grant permissions to it. Go to Security Center > Security policy > Data query and analysis control > Queryable data source. Find the data source that you want to query. In the Operation column, click Authorization to grant permissions to your account. For more information, see Security Center.

  2. Create a temporary file.

    1. Method 1: If you are on the SQL Query page for the first time or no SQL file is open, click Create SQL Query to create a temporary File.

    2. Method 2: If an SQL file is already open, click the image.png icon to create a temporary File.

    Note

    For more information about how to create an SQL query, see SQL Query (Legacy).

  3. Select Data Source.

    On the edit page of the temporary file, select the workspace, engine type, and data source for the query. This example uses a MaxCompute data source.

Write SQL commands

On the edit page of the temporary file, enter the following SQL statement and click the image.png icon to query data from the ads_user_info_1d table. In this example, the partition is specified as dt="20241126".

-- If the target partition is not found, run the show partitions tablename command to confirm the table partitions.
select * from ads_user_info_1d where dt='data timestamp';

View query results and modify charts

After the query is complete, click the image.png icon in the navigation pane to the left of the results to visualize the data. You can also click the image.png icon in the upper-right corner of the chart to open the chart editor and modify the chart.

image.png

Numbers of registered members in different provinces and cities

  1. Double-click the default title above the chart and enter a new title.

  2. Style settings.

    In the right-side panel, choose Style > Chart morph > Stacked Hori Bar Chart.

  3. Data settings.

    In the left-side panel, click Data. Set the X-axis field to Count (Distinct Count) and the Y-axis field to region.

    1. Drag the uid field to X-axis. From the X-axis drop-down list, choose Aggregation > Distinct.

    2. Drag the region field to Y-axis.

  4. Modify the x-axis and y-axis Axis Title.

    In the right-side panel, click Style. Go to Global Settings > Detailed, click Detailed, and select the Chart Styles tab.

    1. Click Axis Title for the X-axis. In the Text section, change the title for the X-axis from uid to Number of Registered Members.

    2. Click Axis Title for the Y-axis. In the Text section, change the title for the Y-axis from region to Province.

    3. Click Save in the upper-right corner to save the chart.

    image.png

  5. Review the final chart.

    image.png

Distribution of member page views by age

  1. Double-click the default title above the chart and enter a new title.

  2. Style settings.

    In the right-side panel, choose Style > Chart morph > Pie Chart.

  3. Data settings.

    In the left-side panel, click Data.

    1. Drag age_range to Type.

    2. Drag pv to Value. From the Value drop-down list, choose Aggregation > Sum.

    3. Click Save in the upper-right corner to save the chart.

    image.png

  4. Review the final chart.

    image.png

Distribution of page views of members by gender

  1. Double-click the default title above the chart and enter a new title.

  2. Style settings.

    In the right-side panel, choose Style > Chart morph > Pie Chart.

  3. Data settings.

    In the left-side panel, click Data.

    1. Drag gender to Type.

    2. Drag pv to Value. From the Value drop-down list, choose Aggregation > Sum.

    3. Click Save in the upper-right corner to save the chart.

    image.png

  4. Review the final chart.

    image.png

Numbers of page views of members counted by gender and zodiac sign

  1. Double-click the default title and enter a new title for the chart.

  2. Style settings.

    In the right-side panel, choose Style > Chart morph > Pie Chart.

  3. Data settings.

    In the left-side panel, click Data.

    1. Drag gender to X-axis.

    2. Drag pv to Y-axis. From the Y-axis drop-down list, choose Aggregation > Sum.

    3. Drag zodiac to Trace.

    image.png

  4. Modify the x-axis and y-axis Axis Title.

    In the right-side panel, click Style. Go to Global Settings > Chart Information, click Detailed, and select the Chart Styles tab.

    1. Click Axis Title for the X-axis. In Text, you can set the X-axis title. For example, change gender to Gender.

    2. Click Axis Title for the Y-axis. In Text, you can set the title of the Y-axis field. Change pv to Page Views.

    3. Click Save in the upper-right corner to save the chart.

    image.png

  5. Review the final chart.

    image.png

Next steps

  1. After you finish editing the chart, click Save in the upper-right corner to save and share the result.

    image.png

  2. Charts that you save are available on the DataAnalysis page. Click image in the sidebar to view them.

    image.png