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:
The differences between workspaces in basic mode and workspaces in standard mode, including the differences in physical architectures and task development procedures. For more information, see Differences between workspaces in basic mode and workspaces in standard mode.
How to add and associate data sources. For more information, see Add and manage data sources and Preparations before data development: Associate a data source or a cluster with DataStudio.
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 istest_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.
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
|
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:
The upgrade operation is irreversible. Proceed with caution.
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 . On the page that appears, select the desired workspace from the drop-down list and click Go to Management Center.
On the Basic Settings tab of the Workspace page, click Upgrade to Standard Mode next to Basic Mode.
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.
Generate a MaxCompute project and a data source for the development environment. The project name is in the
Project name_dev
format.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.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.
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. |
|
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.
|
|
Access resources in an environment | projectname.tablename/resource/function |
|