This tutorial demonstrates creating user profiles using a sample dataset from DataWorks. It guides you through data synchronization, processing, and quality monitoring in DataWorks in the China (Shanghai) region. You must prepare a MaxCompute project, a DataWorks workspace, and the necessary data sources, computing, and storage resources.
Background
To improve business strategies, you need to extract basic user profile data, such as geographic and social attributes, from user website behavior. This enables scheduled profile analysis for the fine-grained management of website traffic.
Before you begin
Before you start, read the experiment introduction to understand the complete workflow of the user profile analysis use case.
Notes
-
This tutorial provides the required user information dataset and website access test dataset. You can use them directly.
-
This tutorial provides mock data for hands-on practice in DataWorks.
-
This tutorial uses Data Studio (New Version) for data processing.
Prepare the MaxCompute environment
Step 1: Activate MaxCompute
This tutorial requires MaxCompute. Ensure you have activated MaxCompute. Use the following parameters to activate it in the China (Shanghai) region.
-
Region: China (Shanghai)
-
Type: Standard computing resources.
Step 2: Create MaxCompute projects
A DataWorks workspace in Standard Mode must be bound to two MaxCompute projects: one as the computing resource for the development environment and the other for the production environment.
-
Go to the MaxCompute console. In the left-side navigation pane, choose .
-
Click New Project and create two MaxCompute projects. The following table describes the key parameters. Use the default values for all other parameters.
Parameter
Value
Project Name
Enter a globally unique name.
Examples for this tutorial:
-
Production environment:
workshop2024_01 -
Development environment:
workshop2024_01_dev
Billing Method of Computing Resources
For this tutorial, select pay-as-you-go.
Default Quota
For this tutorial, select
os_PayAsYouGoQuota(pay-as-you-go Standard Edition).Data Type
For this tutorial, select 2.0 Data Type (Recommended).
Storage Encryption
For this tutorial, select Not encrypted.
-
For more information, see Create a MaxCompute project.
Prepare the DataWorks environment
Before you use DataWorks for development, make sure that you have activated DataWorks. For more information, see Activate DataWorks.
Step 1: Create a workspace
If you already have a workspace that uses the new version of Data Studio in the China (Shanghai) region, you can use it and skip this step.
-
Log on to the DataWorks console. In the top navigation bar, switch the region to China (Shanghai). In the left-side navigation pane, click Work space to go to the workspace list page.
-
Click Create Workspace to create a Use Data Studio (New Version) workspace that uses Data Studio (New Version) and has Isolate Development and Production Environments.
NoteStarting February 18, 2025, Data Studio (New Version) is enabled by default for new DataWorks workspaces created in the China (Shanghai) region by first-time users.
For more information, see Create a workspace.
Step 2: Create a serverless resource group
-
Purchase a serverless resource group.
This tutorial requires a DataWorks serverless resource group for data synchronization and scheduling. You must purchase a serverless resource group and complete the initial setup.
-
Go to the DataWorks - Resource Group List page. In the top navigation bar, switch the region to China (Shanghai). In the left-side navigation pane, click Resource Group to go to the Resource Groups page.
-
Click Create Resource Group. On the resource group purchase page, set Region and Zone to China (Shanghai) and specify a Resource Group Name. Configure other parameters as prompted and complete the payment. For information about the billing of serverless resource groups, see Billing of serverless resource groups.
NoteIf no Virtual Private Cloud (VPC) or vSwitch is available in the current region, click the corresponding console link in the parameter description to create them. For more information about VPCs and vSwitches, see What is a Virtual Private Cloud (VPC)?.
-
Bind the resource group to a DataWorks workspace.
You must bind a new serverless resource group to a workspace before you can use it.
Go to the DataWorks - Resource Group List page. In the top navigation bar, switch the region to China (Shanghai). Find the serverless resource group that you purchased. In the Operation column, click Associate Workspace, and then click Associate next to the DataWorks workspace that you created.
-
Configure public internet access for the resource group.
This tutorial retrieves sample data from the internet. By default, resource groups do not have access to the public internet. Therefore, you must configure an Internet NAT Gateway and an Elastic IP Address (EIP) for the VPC that is bound to the resource group to enable internet access.
-
Log on to the Virtual Private Cloud - Internet NAT Gateway console. In the top navigation bar, switch the region to China (Shanghai).
-
Click Create Internet NAT Gateway and configure the parameters. The following table lists the key parameters for this tutorial. Use the default values for other parameters.
Parameter
Value
Region
China (Shanghai).
Network and Zone
Select the VPC and vSwitch that are bound to the resource group.
You can go to the DataWorks console, switch the region to China (Shanghai), and then click Resource Group in the left-side navigation pane to go to the Resource Groups page. Find the resource group that you created, click Network Settings in the Operation column, and then view the bound VPC and Switch in the Data Scheduling & Data Integration section. For more information about VPCs and vSwitches, see What is a Virtual Private Cloud (VPC)?.
Network Type
Internet NAT Gateway.
EIP
Select Create Elastic IP Address.
Service-linked role creation
If this is the first time you create a NAT gateway, you must create a service-linked role. Click Create Service-Linked Role.
-
Click Buy Now, agree to the terms of service, and then click Activate to complete the purchase.
-
After purchasing the Internet NAT Gateway instance, return to the console and create an SNAT entry for it.
NoteThe resource group can access the internet through the VPC only after you configure an SNAT entry.
-
In the Actions column of the newly purchased instance, click Management to go to the management page of the instance. Then, click the SNAT Management tab.
-
In the SNAT Entry List section, click Create SNAT Entry. The following table describes the key parameters.
Parameter
Value
SNAT entry granularity
Select VPC to ensure that all resource groups in the VPC where the NAT gateway resides can access the internet through the configured Elastic IP Address.
Select an Elastic IP address
Select the Elastic IP Address associated with the current NAT gateway instance.
-
After configuring the SNAT entry, click OK.
In the SNAT Entry List, when the Status of the newly created SNAT entry changes to Enabled, the VPC bound to the resource group can access the internet.
-
-
For more information, see Use a serverless resource group.
Step 3: Bind MaxCompute as a computing resource
Bind the MaxCompute projects to your DataWorks workspace as computing resources. This allows you to process data in MaxCompute using Data Studio.
-
Go to the DataWorks - Workspace List page. In the top navigation bar, switch the region to China (Shanghai). Find the workspace that you created and click its name to go to the Workspace Details page.
-
In the left-side navigation pane, click Computing Resources.
-
Click Associate Computing Resources, select a Compute Resource Type, and then configure the parameters.

This tutorial uses MaxCompute as both a computing and storage resource. Set the computing resource type to MaxCompute and configure the parameters. The following table describes the key parameters for this tutorial. Use the default values for other parameters.
Parameter
Description
MaxCompute Project
Select the MaxCompute projects to bind. For this tutorial, bind the corresponding MaxCompute projects that you created in Step 2 to the development and production environments, respectively.
Default Access Identity
The identity used to access the MaxCompute project from the current workspace.
-
Development environment: Only the Executor identity is supported.
-
Production environment: You can select an identity from the drop-down list based on your logon account. This tutorial selects Alibaba Cloud primary account.
NoteIf you are logged on with a different identity, see Data Studio (New Version): Bind a MaxCompute computing resource.
Computing Resource Instance Name
Enter a custom name to identify the computing resource. When a task runs, it uses this instance name to select the computing resource.
Connection Configuration
Specifies the resource group used to connect to the MaxCompute computing resource. The serverless resource group that is created and bound to the current workspace is displayed. Test the connectivity for both the development and production environments.
-
-
Click Confirm to complete the configuration of the MaxCompute computing resource.
For more information, see Bind a computing resource.
Next steps
Now that you have prepared the environment, you can proceed to the next tutorial. In the next tutorial, you will learn to synchronize user information and website access logs to OSS, and then use an ODPS SQL node to create a table and query the synchronized data. For more information, see Synchronize data.