All Products
Search
Document Center

DataWorks:Prepare the environment

Last Updated:Jul 10, 2026

Prepare the MaxCompute projects, DataWorks workspace, and data source, compute, and storage configurations required for the user profile analysis scenario in the China (Shanghai) region.

Background

Analyze user behavior on your website by building basic user profiles that cover geographic and social attributes, and run scheduled analyses to support fine-grained traffic operations and business strategy.

Before you begin

Before you start, read the Experiment introduction to understand the user profile analysis workflow.

Notes

  • This tutorial provides user information and website access test data that you can use directly.

  • The provided data is simulated and intended only for hands-on practice with DataWorks.

  • This tutorial uses DataStudio (legacy) for data transformation.

Prepare the MaxCompute environment

1. Activate MaxCompute

This tutorial requires MaxCompute. Activate MaxCompute in the China (Shanghai) region with the following parameters.

  • Region: China (Shanghai)

  • Type: Standard compute resources.

2. Create MaxCompute projects

A DataWorks workspace in standard mode requires two MaxCompute projects: one for the development environment and one for the production environment.

  1. Go to the MaxCompute console. In the left-side navigation pane, choose Manage Configurations > Project management.

  2. Click New Project to create two MaxCompute projects. The following table lists the key parameters for this tutorial. Leave other parameters at their default values. For more information, see Create a MaxCompute project.

    Parameter

    Description

    Project Name

    Custom, must be globally unique.

    Examples in this tutorial:

    • Production environment: workshop2024_01.

    • Development environment: workshop2024_01_dev.

    Billing Method of Computing Resources

    Select Pay-as-you-go for this tutorial.

    Default Quota

    Select the default postpaid quota from the drop-down list for this tutorial.

    Data Type

    Select 2.0 data type (recommended) from the drop-down list for this tutorial.

    Storage Encryption

    Select No encryption for this tutorial.

For more information about creating MaxCompute projects, see Create a MaxCompute project.

Prepare the DataWorks environment

Activate the DataWorks service before you begin. For more information, see Purchase guide.

1. Create a workspace

  1. Log on to the DataWorks console, switch the region to China (Shanghai) at the top, and click Work space in the left-side navigation pane to enter the workspace list page.

  2. Click Create Workspace to create a standard mode workspace (Isolate Development and Production Environments). Do not select Use Data Studio (New Version).

Note
  • After February 18, 2025, when an Alibaba Cloud account activates DataWorks for the first time in the China (Shanghai) region and creates a workspace, the new Data Studio is enabled by default, and the Use Data Studio (New Version) parameter is no longer displayed. If the new Data Studio is enabled by default, see Get started with the new Data Studio for the corresponding tutorial.

For more information about creating a workspace, see Create a workspace.

2. Create a serverless resource group

Data synchronization from OSS and MySQL to MaxCompute runs on a DataWorks serverless resource group. Purchase one and complete the prerequisite setup.

  1. Purchase a serverless resource group.

    Purchase a DataWorks serverless resource group for data synchronization and scheduling.

    1. Log on to the DataWorks Resource Group List page. Switch the region to China (Shanghai) at the top, and click Resource Group in the left-side navigation pane to enter the Resource Groups page.

    2. Click Create Resource Group. On the resource group purchase page, set Region and Zone to China (Shanghai), configure the Resource Group Name, and set the other parameters as prompted. Then complete the payment as instructed. For the billing details of serverless resource groups, see Serverless resource group billing.

      Note

      If no VPC or vSwitch is available in the current region, click the corresponding console link in the parameter description to create one. For more information about VPCs and vSwitches, see What is VPC.

  2. Associate the resource group with the DataWorks workspace.

    Associate the serverless resource group with your workspace to make it available for use.

    Log on to the DataWorks Resource Group List page. Switch the region to China (Shanghai) at the top, find the purchased serverless resource group, click Associate Workspace in the Operation column, and then click Associate next to the created DataWorks workspace.

  3. Configure Internet access for the resource group.

    The test data is fetched over the Internet, but the resource group has no Internet access by default. Configure an Internet NAT Gateway and attach an EIP for the VPC bound to the resource group.

    1. Log on to the VPC - Internet NAT Gateway console. Switch to the China (Shanghai) region in the top menu bar.

    2. Click Create Internet NAT Gateway and configure the parameters. The following are the key parameters for this example. Leave other parameters at their default values.

      Parameter

      Value

      Region

      China (Shanghai).

      Network and Zone

      Select the VPC and vSwitch that the resource group is bound to.

      You can go to the DataWorks console, switch the region, click Resource Groups in the left-side navigation pane, find the created resource group, click Network Settings in the Operation column, and view the VPC and Switch in the Data Scheduling & Data Integration section. For more information about VPCs and vSwitches, see What is VPC.

      Network Type

      Internet NAT Gateway.

      EIP

      Purchase a new EIP.

      Create Linked Role

      When you create a NAT Gateway for the first time, you must create a service-linked role. Click Create Service-Linked Role.

    3. Click Buy Now, select the service agreement, and then click Activate to complete the purchase.

For more information about adding and using serverless resource groups, see Use serverless resource groups.

3. Associate MaxCompute projects

Associate the created MaxCompute projects as compute resources with the DataWorks workspace so that you can process data in MaxCompute from Data Studio.

  1. Go to the DataWorks workspace list page. Switch the region to China (Shanghai) at the top, find the created workspace, and click the workspace name to enter the Workspace Details page.

  2. Click Computing Resources in the left-side navigation pane to automatically jump to the DataStudio > Compute Resources (image) page.

  3. Click Create Computing Resource, select the Compute Resource Type to associate, and then configure the parameters.

    This tutorial uses MaxCompute as the compute and storage resource, so select MaxCompute as the compute resource type and configure the related parameters. The following are the key parameters for this example. Leave other parameters at their default values.

    Parameter

    Description

    Data Source Name

    Custom name for the compute resource. Tasks reference this name to select the resource.

    Alibaba Cloud Account

    Set to Current Alibaba Cloud Account.

    Region

    Select China (Shanghai), the same region as the current DataWorks workspace.

    MaxCompute Project Name

    Select the MaxCompute project to associate. In this tutorial, associate the corresponding MaxCompute projects created in Step 2 for the production and development environments respectively.

    Default Access Identity

    Identity used to access the MaxCompute project from the current workspace.

    • Development environment: Currently, only access using the Executor identity is supported.

    • Production environment: Select from the drop-down list based on the currently logged-on account. This tutorial selects Alibaba Cloud primary account.

      Note

      If you are logged on with another identity, see New Data Studio: Associate a compute resource for the specific configuration.

    Connection Configuration

    Resource group used to connect to the MaxCompute compute resource. Only serverless resource groups associated with the current workspace are listed. Test connectivity for both the development and production environments.

  4. Click Create and Associate Computing Resource with DataStudio.

    As prompted, refresh the Data Studio compute resources page to verify the associated MaxCompute compute resource.

    Note

    If the created MaxCompute compute resource is in the Not Associated state, click the Associate button to associate it.

Next step

Your environment is ready. Next, synchronize basic user information and website access log data to MaxCompute. For more information, see Data synchronization.