All Products
Search
Document Center

DataWorks:Scenario: Upgrade a workspace from the basic mode to the standard mode

Last Updated:Nov 13, 2024

If you use a workspace in basic mode and you want to isolate the development environment from the production environment, you can upgrade the workspace from the basic mode to the standard mode. This topic describes how to upgrade the workspace mode.

Before you begin

Before you upgrade the workspace mode, make sure that you understand the following items:

Limits

Only Alibaba Cloud accounts can be used to upgrade the workspace mode.

Upgrade policy

After you upgrade a workspace from the basic mode to the standard mode, DataWorks adds a data source in the development environment based on the data source in the production environment of the workspace to isolate data sources in the environments.

  • MaxCompute data source: DataWorks provides an upgrade policy based on whether a MaxCompute data source is associated with DataStudio.  

    • The data source is not associated with DataStudio:

      • Copy the data source in the production environment to the development environment and set the Default Access Identity parameter to Executor for the data source in the development environment.

      • If the value of the Default Access Identity parameter for a data source in a workspace in basic mode is Task Owner, the value of the Default Access Identity parameter for the data source in the production environment changes to Alibaba Cloud primary account after you upgrade the workspace from the basic mode to the standard mode. Data sources in a workspace in basic mode are in the production environment.

    • The data source is associated with DataStudio:

      Copy the data source in the production environment to the development environment. DataWorks automatically adds the _dev suffix to the name of the related MaxCompute project in the development environment. If the name of the related MaxCompute project in the production environment contains _dev, DataWorks adds one more _dev suffix to the name of the related MaxCompute project in the development environment.

      For example, the name of a MaxCompute project in the production environment is test_dev. After you upgrade the workspace from the basic mode to the standard mode, the name of the MaxCompute project in the development environment is test_dev_dev.

  • Data sources other than MaxCompute data sources: Copy the data source in the production environment to the development environment. The same database is used in the development and production environments.

Note

This topic describes how to upgrade the mode of a workspace in which a MaxCompute data source is added from the basic mode to the standard mode.

模式升级

Item

Before the upgrade

After the upgrade

Data source

One data source

A data source that is used in the development environment is added. You can add different data sources to the development environment and production environment.

Note
  • During the upgrade, a data source that has the same configurations as the data source in the production environment is generated in the development environment. After the upgrade is complete, you can go to the data source configuration page to view the data sources in the development and production environments. For more information, see Add and manage data sources.

  • After the upgrade:

    • The data source in the development environment is completely isolated from the data source in the production environment. Modifying the configurations of the data source in the development environment does not affect the use of the data source in the production environment.

    • Tables in the development environment will not be added to the related MaxCompute project in the development environment. You need to create tables in the development environment based on your business requirements. For information about how to create a MaxCompute table, see Create and manage MaxCompute tables.

Upgrade the workspace mode

You can log on to the DataWorks console with an Alibaba Cloud account and perform the following operations to upgrade a workspace from the basic mode to the standard mode:

Note

The upgrade operation is irreversible. Proceed with caution.

  1. Go to the Management Center page.

    Log on to the DataWorks console. In the top navigation bar, select the desired region. In the left-side navigation pane, choose More > Management Center. On the page that appears, select the desired workspace from the drop-down list and click Go to Management Center.

  2. On the Basic Settings tab of the Workspace page, click Upgrade to Standard Mode next to Basic Mode.

  3. In the Upgrade to Standard Mode dialog box, select The upgrade operation is irreversible. Are you sure that you want to upgrade the mode of the workspace? and click Start Upgrade.

Impacts of the upgrade on a MaxCompute data source

This section provides examples to describe the impacts on a MaxCompute data source after you upgrade a workspace from the basic mode to the standard mode. For more information, see Data access behaviors in and required access permissions on MaxCompute compute engine instances associated with workspaces in different modes.

Upgrade process

After you upgrade a workspace from the basic mode to the standard mode, DataWorks clones the members of the workspace to the MaxCompute project in the development environment and retains the original roles for the members. In the MaxCompute project in the production environment, DataWorks retains only the permissions of the workspace owner, and revokes the permissions of other members.

  1. Generate a MaxCompute project and a data source for the development environment. The project name is in the Project name_dev format.

  2. Add members to the MaxCompute project in the development environment. The command add user is used to add DataWorks workspace members to the MaxCompute project as members.添加项目成员

  3. Revoke the permissions on the MaxCompute project in the production environment from the original workspace members. In a workspace in basic mode, RAM users have high permissions on data in the production environment. After you upgrade the workspace, the permissions on the MaxCompute project in the production environment are revoked from the RAM users. The RAM users can perform operations only on the MaxCompute project whose name is suffixed with _dev.

Sample scenario

For example, a company has Workspace A in DataWorks and upgrades Workspace A from the basic mode to the standard mode. A workspace that is named A_dev is created in the development environment.

  • The members, roles, and resources in Workspace A are all created in Workspace A_dev.

  • Member A1 that is assigned the Development role and Member B1 that is assigned the O&M role in Workspace A also join Workspace A_dev with their roles retained.

  • Project A becomes a project in the production environment. The permissions of Members A1 and B1 in Workspace A are revoked. By default, members A1 and B1 cannot query or drop tables. This ensures the security of data in the production environment.

  • By default, the project that is used on the DataStudio page is Project A_dev. To query the data of a table in the production environment on the DataStudio page, you must specify the table name in the format of Project name.Table name. On the DataStudio page, you can modify the task code only in Workspace A_dev. To update the task code in Workspace A, you must commit the related node in Workspace A_dev and deploy the node to the production environment. The deployment and review of the node ensure the correctness of node code in the production environment.

Note

By default, you cannot access the data of the original workspace after the workspace mode is upgraded. To access the data, you must request the required permissions. By default, the tables that are queried on the DataStudio page are from the development environment. To query a table in the production environment, you must request the required permissions and specify the table name in the format of Project name.Table name.

After a workspace is upgraded to the standard mode, the original roles of RAM users are revoked. If you use the AccessKey pair of a RAM user in node code, an error may be reported to inform you that you do not have the required permissions.

Sample changes

For example, you add a MaxCompute data source in a workspace in basic mode and an Alibaba Cloud account is specified to perform operations in the workspace. After the workspace is upgraded from the basic mode to the standard mode, the operations that RAM users can perform change. The following table describes the changes.

Scenario

Workspace in basic mode

Workspace in standard mode

Perform operations on tables, resources, or functions

RAM users can directly perform operations on tables, resources, or functions.

Note

In the workspace in basic mode, an Alibaba Cloud account is specified to perform operations in the workspace. RAM users have the same permissions as the Alibaba Cloud account. The Alibaba Cloud account has the highest level of permissions. Therefore, RAM users can directly perform operations on data in the production environment, and permissions cannot be managed.

  • Development environment: RAM users can run commands on the DataStudio page to perform operations on resources in the development environment.

  • Production environment: By default, RAM users cannot perform operations on resources in the production environment on the DataStudio page.

    Note

    By default, RAM users in a workspace in standard mode do not have permissions on the production environment. If you want to perform operations on resources in the production environment as a RAM user, you must request the required permissions in Security Center.

Use accounts to access data in different environments

The workspace in basic mode has only the production environment. You can directly run commands to perform operations on resources in the production environment.

  • DataStudio: The Alibaba Cloud account is used to access resources in the production environment.

  • Operation Center in the production environment: The Alibaba Cloud account is used to access resources in the production environment.

  • DataStudio: By default, RAM users or personal accounts are used to access resources in the development environment.

  • Operation Center in the production environment: Specified accounts are used to access resources in the production environment.

Access resources in an environment

projectname.tablename/resource/function

  • Access resources in the development environment: projectname_dev.tablename/resource/function

    Note

    By default, resources that are accessed on the DataStudio page are resources in the development environment. You do not need to reference a project name in SQL statements that are used to access tables, resources, or functions.

  • Access resources in the production environment: projectname.tablename/resource/function

    Note

    By default, resources that are accessed in Operation Center in the production environment are resources in the production environment. You do not need to reference a project name in SQL statements that are used to access tables, resources, or functions.