After you run an export task to export data objects from a workspace, you can create an import task to import these data objects to a specific workspace.
- The Migration Assistant feature is in public preview. This feature is supported in the following regions: China (Hangzhou), China (Shanghai), China (Beijing), China (Zhangjiakou), China (Shenzhen), China (Chengdu), and Singapore (Singapore).
- To create an export or import task, you must use an Alibaba Cloud account or be a workspace administrator. If you use a workspace as a Resource Access Management (RAM) user who is not assigned the administrator role, you can only view export and import tasks.
Go to the Migration Assistant page
- Log on to the DataWorks console.
- In the left-side navigation pane, click Workspaces.
- After you select the region where the required workspace resides, find the workspace and click Data Analytics.
- Click the icon in the upper-left corner. Then, choose . By default, is displayed.
Create an import task
- In the left-side navigation pane of the Migration Assistant page, choose .
- On the Import Tasks page, click Create Import Task in the upper-right corner.
- In the Create Import Task dialog box, configure the parameters.
Parameter Description Name The name of the import task. The name can contain only letters, digits, underscores (_), and periods (.). Upload From The source of the package that you want to import. Valid values: Local and OSS.
- If you select Local for this parameter, perform the following steps to upload a package from your on-premises
Note The size of the package that you want to upload cannot exceed 30 MB.
- Click Upload File.
- Select the package that you want to upload and click Open.
- Click Check.
- After the message The resource package has passed the check appears, click Preview. On the page that appears, check the package that you want to import.
- If you select OSS for this parameter, enter the endpoint of an Object Storage Service (OSS) object in the OSS Endpoint field. Then, click Check and Preview in sequence to check and preview the package that you want to upload.
Remarks The description of the import task.
- If you select Local for this parameter, perform the following steps to upload a package from your on-premises machine:
- Click OK. The Import Task Settings page appears. Make sure that you have checked the format and content of the package before you click OK.
- Configure the import task. When you configure the import task, you must complete the settings in the Engine Instance Mapping section. The following figure provides an example, in which a MaxCompute compute engine instance is used. The settings in other sections are optional and can be configured based on your business requirements.Note If you migrate data objects between the workspaces that reside in the same region and belong to the same tenant, you need only to configure a mapping between compute engine instances.
- In the Engine Instance Mapping section, select a compute engine instance that is associated with the destination
workspace to establish a mapping. The Compute Engine Instances of Target Workspace column displays the names of compute engine instances associated with the destination workspace rather than MaxCompute project names. You can go to the Workspace Management page of a workspace and view the name of a compute engine instance in the Compute Engine Information section. For more information, see Go to the Workspace Management page.The following figure shows the names of MaxCompute compute engine instances that are associated with the workspace.If multiple types of compute engines are enabled for the source workspace but only one type of compute engine is enabled for the destination workspace, the import task fails. This is because some types of nodes cannot be created in the destination workspace due to the absence of the required compute engines.
- Optional:In the Resource Group Mapping section, configure a resource group mapping between the source and destination workspaces. This ensures that resource groups are available for imported nodes.
- Optional:In the Dependency Mapping section, configure a workspace mapping for the related nodes. Some nodes use the name of the source workspace in their code. In this case, you must configure a workspace mapping for the nodes. This ensures that these nodes are normally run after they are imported. Set the New Workspace parameter to the name of the destination workspace. The system uses this name to replace the original workspace name in the code, input settings, and output settings of the nodes.
- Optional:In the Dry-run section, find the destination node that you want to set as a dry-run node and click
Set up empty run in the Actions column. You can also select multiple nodes and click Batch Configure to set these nodes as dry-run nodes.
This configuration is used to configure time properties for auto triggered nodes. The system returns a success response for the auto triggered node that is set as a dry-run node without running the node. The node does not generate data.
- Optional:In the Commission Rules section, configure the commission rules for resources, tables, and functions, and
specify whether to enable Change Owner based on your business requirements. Note
- If the destination workspace contains a data object that has the same name as the data object that you want to import, the data object that you want to import cannot be committed.
- If you select No for the Change Owner parameter and no owner is specified for the node that you want to import, you are automatically configured as the owner of the node after it is imported.
- In the Engine Instance Mapping section, select a compute engine instance that is associated with the destination workspace to establish a mapping.
- Click Import in the upper-right corner.
- In the Confirm message, click OK.
View and manage import tasks
- After an import task is completed, you can view the details of the task. To view the task details, find the task on the Import Tasks page and click View Import Report in the Actions column. On the page that appears, view the task information in the Basic Information, Import Settings, Import results, and Details sections.
- If an import task is in the Editing state, you can perform the following operations on the task:
- Click Edit in the Actions column. On the Import Task Settings page, modify the task configurations.
- Click Preview in the Actions column. On the page that appears, view the task information in the Basic Information, Overview, and Details sections.
- Click Delete in the Actions column. In the message that appears, click Ok to delete the task.
- If an import task is in the Import failed state, you can click Re-import in the Actions column of the task. In the Import progress dialog box, click Return to import task list after the import task is completed.