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

Limits

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

Prerequisites

You must be familiar with the following information before you upgrade a workspace from the basic mode to the standard mode:

Changes

After you upgrade a workspace from the basic mode to the standard mode, a development environment is provided based on the production environment of the workspace.
Note If you upgrade a workspace with which a compute engine other than a MaxCompute compute engine is associated from the basic mode to the standard mode, a development environment is generated based on the configurations of the production environment of the workspace. This indicates that the same database is used in the development and production environments. This topic describes the scenarios in which you need to upgrade the mode of a workspace with which a MaxCompute compute engine is associated.
Upgrade the workspace mode
ItemBefore the upgradeAfter the upgrade
Number of compute enginesOne compute engineA compute engine that is used in the development environment is added. You can associate different compute engines with a workspace in the development and production environments.
Note
  • If you upgrade a workspace with which a MaxCompute compute engine is associated from the basic mode to the standard mode, a MaxCompute project that is used in the development environment is generated.
  • If you upgrade a workspace with which a compute engine other than a MaxCompute compute engine is associated from the basic mode to the standard mode, a compute engine is generated for the development environment based on the compute engine that is used in the production environment of the workspace. After the upgrade is complete, you can go to the Compute Engine Information section of the Workspace Management page to modify the configurations of the compute engines in the two environments to isolate data in the development environment from that in the production environment.
Data sourceOne group of data sourcesA group of data sources that are used in the development environment are added. You can use different data sources in a workspace in the development and production environments.
Note
  • During the upgrade, a group of data sources that have the same configurations as the data sources used in the production environment of the workspace are generated for the development environment. After the upgrade is complete, you can go to the data source configuration page to modify the configurations of the data sources in the two environments to isolate data in the development environment from that in the production environment. For more information, see Manage connections.
  • After a workspace is upgraded from the basic mode to the standard mode, data sources in the development environment are isolated from data sources in the production environment. The modification of configurations of data sources in the development environment does not affect the use of data sources in the production environment.
TableOne tableIf you upgrade a workspace with which a MaxCompute compute engine is associated from the basic mode to the standard mode, a table is generated in the development environment and the table has the same schema as the table in the production environment.
Note

After the upgrade is complete, the system does not synchronize data from the production environment to the development environment.

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:

  1. Go to the Workspace Management page of a workspace.
  2. On the Configuration page, click Upgrade to standard mode next to Simple Mode.
  3. In the Upgrade to standard mode dialog box, enter a name in the MaxCompute Project Name field in the Development Environment section, select Confirm that you want to upgrade this workspace, and then click Confirm.
    Important During the upgrade, a development environment is automatically generated based on the production environment of the workspace in basic mode. If a MaxCompute compute engine is associated with the workspace, a MaxCompute project is generated for the development environment based on the original MaxCompute project used in the production environment. After the upgrade is complete, you can go to the Compute Engine Information section of the Workspace Management page to modify the configurations of the associated projects. For example, you can modify the identity that is used to access the workspace in the production environment.
  4. In the Confirm upgrade message, click OK.

After the preceding operations are complete, you can go back to the Configuration page and check whether the workspace mode is displayed as Standard.

Impacts of the upgrade on a MaxCompute compute engine

This section uses a use case to describe the impacts on a MaxCompute compute engine 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 with which a MaxCompute compute engine is associated from the basic mode to the standard mode, DataWorks clones the members of the workspace to the MaxCompute project that is generated for the development environment, and retains the members and roles of the original MaxCompute project. In the MaxCompute project that is used 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, a group of data sources, and a table schema for the development environment. The project name is in the Project name_dev format.
  2. Add members to the MaxCompute project that is generated for the development environment. DataWorks workspace members are added as members to the MaxCompute project. The command that is used to add members is add user. Add members to a project
  3. Revoke the permissions on the MaxCompute project that is used 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 that is used 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, tables, and resources in Workspace A are all created in Workspace A_dev. Only tables are created, but table data is not cloned.
  • 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 is used in the production environment. The permissions of Members A1 and B1 in Workspace A are revoked. By default, they are not allowed to query or drop tables. This way, data in the production environment is protected.
  • 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 edit the node code only in Project A_dev. To update the node code in Workspace A, you must commit the related node in Project 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 thrown to inform that you do not have permissions.

Sample changes:

For example, you associate a MaxCompute compute engine with a workspace in basic mode, and an Alibaba Cloud account is specified to perform operations on the associated MaxCompute project. After the workspace is upgraded from the basic mode to the standard mode, the operations that RAM users are allowed to perform change. The following table describes the changes.
ScenarioWorkspace in basic modeWorkspace in standard mode
Perform operations on tables, resources, or functionsRAM 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.
  • Perform operations on resources in the development environment: RAM users can run commands on the DataStudio page to perform operations on resources in the development environment.
  • Perform operations on resources in the 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 environmentsThe 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: 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 environmentprojectname.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 from the development environment. Therefore, 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. Therefore, you do not need to reference a project name in SQL statements that are used to access tables, resources, or functions.