All Products
Search
Document Center

DataWorks:Data visualization

Last Updated:Aug 20, 2026

The DataAnalysis module in DataWorks provides a data visualization tool to display processed data in charts, allowing for quick analysis. This topic demonstrates how to visualize user profile data.

Prerequisites

Before you begin, ensure you have completed the steps in Process data to generate the basic user profile data.

Visualization scenarios

This example uses DataAnalysis to visualize and analyze user profile data, covering the following scenarios:

Scenario

Chart example

City registration leaderboard

image.png

Visit count distribution by age for registered members

image.png

Visit count distribution by gender for registered members

image.png

Analysis of visit counts by gender and zodiac sign

image.png

Go to the SQL Query page

The operations in this example are performed in the DataAnalysis's SQL Query feature.

Log on to the DataWorks console. In the target region, click Data Analysis and Service > DataAnalysis 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

  1. Authorize a Data Source.

    You must authorize a data source before using it in Data Analysis. Navigate to the Security Center > Security policy > Data Query Control > Queryable data source 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.

  2. Create a Temporary File.

    1. 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.

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

    Note

    For more information about creating SQL queries, see SQL query (legacy).

  3. Select a Data Source.

    On the temporary file editing page, click the image.png 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 an SQL query

In the temporary file editor, enter the following SQL statement and click the image.png button to query data in the ads_user_info_1d_emr table. In this example, the partition is dt='<your_date>'.

-- If the target partition is not found, you can run `show partitions <table_name>` to confirm the available partitions.
select * from ads_user_info_1d_emr where dt='<your_date>';

View query results and edit charts

After the SQL query returns results, click the image.png button in the left-side navigation pane to visualize them. To edit a chart, click the image.png button in its upper-right corner.

Ranking of registered users by city

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

  2. Style settings.

    Click Style Settings > Change Chart > Stacked Bar Chart on the right side of the page.

  3. 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.

    1. Drag the uid column to X Axis, and in the X Axis drop-down list, select Aggregate > Distinct Count.

    2. Drag the region column to Y Axis.

  4. 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.

    1. Click the axis title for X Axis. In Title Display, configure the X Axis column information and change uid to Registered Members.

    2. Click the axis title for Y Axis. In Title Display, configure the Y Axis column information and change region to Province.

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

  5. Verify the final chart.

Distribution of member visits by age group

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

  2. Style settings.

    Click Style Settings > Change Chart > Pie chart on the right side of the page.

  3. 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.

    1. Drag the age_range column to Category.

    2. Drag the pv column to Value, and in the Value drop-down list, select Aggregate > Sum.

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

  4. Verify the final chart.

Distribution of member visits by gender

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

  2. Style settings.

    Click Style Settings > Change Chart > Pie chart on the right side of the page.

  3. Data settings.

    Click Data Settings on the left side of the page. Set the Category column to gender, and the Value column to pv.

    1. Drag the gender column to Category.

    2. Drag the pv column to Value, and in the value drop-down list, select Aggregate > Sum.

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

  4. Verify the final chart.

Analysis of visits by gender and zodiac sign

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

  2. Style settings.

    Click Style Settings > Change Chart > Grouped Column Chart on the right side of the page.

  3. Data settings.

    Click Data Settings on the left side of the page and configure the column information:

    1. Drag the gender column to X Axis.

    2. Drag the pv column to Y Axis, and in the Y Axis drop-down list, select Aggregate > Sum.

    3. Drag the zodiac column to Split.

  4. 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.

    1. Click the axis title for X Axis. In Title Display, you can configure the X Axis column information and change gender to Gender.

    2. Click the axis title for Y Axis. In Title Display, you can configure the Y Axis column information and change pv to Visits.

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

  5. Verify the final chart.

Next steps

  1. 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.

  2. You can view saved charts by clicking the image 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.