Creates an import node. The import node contains the import and export packages of the data sources, task, and table.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes CreateImportMigration

The operation that you want to perform.

CalculateEngineMap String Yes { "ODPS": { "zxy_8221431_engine": "wzp_kaifazheban_engine" }, "EMR": { "aaaa": "bbb" } }

The mapping relationships between the source compute engine and the destination compute engine.

The following types of compute engines are supported: MaxCompute, E-MapReduce (EMR), Hadoop CDH, and Hologres.

CommitRule String Yes { "resourceAutoCommit": false, "resourceAutoDeploy": false, "functionAutoCommit": false, "functionAutoDeploy": false, "tableAutoCommitToDev": false, "tableAutoCommitToProd": false, "ignoreLock": false, "fileAutoCommit": false, "fileAutoDeploy": false }

The rule configured for automatically committing and deploying the import node. The rule contains the following parameters:

  • resourceAutoCommit: specifies whether resources are automatically committed. The value true indicates that the resources are automatically committed, and the value false indicates that the resources are not automatically committed.
  • resourceAutoDeploy: specifies whether resources are automatically deployed. The value true indicates that the resources are automatically deployed, and the value false indicates that the resources are not automatically deployed.
  • functionAutoCommit: specifies whether the function is automatically committed. The value true indicates that the function is automatically committed, and the value false indicates that the function is not automatically committed.
  • functionAutoDeploy: specifies whether the function is automatically deployed. The value true indicates that the function is automatically deployed, and the value false indicates that the function is not automatically deployed.
  • tableAutoCommitToDev: specifies whether the table is automatically committed to the development environment. The value true indicates that the table is automatically committed to the development environment, and the value false indicates that the table is not automatically committed to the development environment.
  • tableAutoCommitToProd: specifies whether the table is automatically committed to the production environment. The value true indicates that the table is automatically committed to the production environment, and the value false indicates that the table is not automatically committed to the production environment.
  • ignoreLock: specifies whether the lock is automatically ignored when an import node is locked. The value true indicates that the lock is automatically ignored, and the value false indicates that the lock is not automatically ignored. If you set this parameter to true, you can forcibly update an import node even if the node is locked.
  • fileAutoCommit: specifies whether the file is automatically committed. The value true indicates that the file is automatically committed, and the value false indicates that the file is not automatically committed.
  • fileAutoDeploy: specifies whether the file is automatically deployed. The value true indicates that the file is automatically deployed, and the value false indicates that the file is not automatically deployed.
Name String Yes test_import_001

The name of the import node. The name must be unique within the workspace.

PackageOssDownloadLink String Yes http://xxxxx/importpackage.zip

The download link of the import package that can be accessed by backend services over the Internet, such as the download link of an object in Object Storage Service (OSS).

PackageType String Yes DATAWORKS_MODEL

The type of the import or export package. Valid values:

  • DATAWORKS_MODEL (Standard format)
  • DATAWORKS_V2 (Apsara Stack DataWorks V3.6.1 to V3.11)
  • DATAWORKS_V3 (Apsara Stack DataWorks V3.12 and later)
ProjectId Long Yes 123456

The ID of the workspace. You can go to the Workspace Management page of the workspace to obtain the ID.

RegionId String Yes cn-shanghai-fiance-1

The region ID. For example, the ID of the China (Shanghai) region is cn-shanghai, and that of the China (Zhangjiakou) region is cn-zhangjiakou. The system automatically determines the value of this parameter based on the endpoint used to call the operation.

WorkspaceMap String No {"test_workspace_src": "test_workspace_target"}

The mapping relationship between the name of the source workspace and that of the destination workspace. The mapping relationship is used to modify the name of the source workspace in the import or export package to the name of the mapped workspace when the import or export operation is performed. For example, the prefix for the name of the source workspace in the import or export package is replaced based on the mapping relationship when the import operation is performed.

Description String No test description

The description of the import or export package.

Response parameters

Parameter Type Example Description
Data Long 123456

The ID of the import or export package. The ID is used as an input parameter when you want the system to run the import node or you want to obtain the running progress of the import node.

ErrorCode String 110001123456

The error code returned.

ErrorMessage String test error message

The error message returned.

HttpStatusCode Integer 200

The HTTP status code.

RequestId String ADFASDFASDFA-ADFASDF-ASDFADSDF-AFFADS

The ID of the request.

Success Boolean true

Indicates whether the request is successful.

Examples

Sample requests

http(s)://[Endpoint]/?Action=CreateImportMigration
&CalculateEngineMap={     "ODPS": {       "zxy_8221431_engine": "wzp_kaifazheban_engine"     },     "EMR": {         "aaaa": "bbb"     }   }
&CommitRule={     "resourceAutoCommit": false,     "resourceAutoDeploy": false,     "functionAutoCommit": false,     "functionAutoDeploy": false,     "tableAutoCommitToDev": false,     "tableAutoCommitToProd": false,     "ignoreLock": false,     "fileAutoCommit": false,     "fileAutoDeploy": false   }
&Name=test_import_001
&PackageOssDownloadLink=http://xxxxx/importpackage.zip
&PackageType=DATAWORKS_MODEL
&ProjectId=123456
&RegionId=cn-shanghai-fiance-1
&<Common request parameters>

Sample success responses

XML format

<RequestId>ADFASDFASDFA-ADFASDF-ASDFADSDF-AFFADS</RequestId>
<HttpStatusCode>200</HttpStatusCode>
<Data>123456</Data>
<ErrorCode>110001123456</ErrorCode>
<ErrorMessage>test error message</ErrorMessage>
<Success>true</Success>

JSON format

{
    "RequestId": "ADFASDFASDFA-ADFASDF-ASDFADSDF-AFFADS",
    "HttpStatusCode": 200,
    "Data": 123456,
    "ErrorCode": 110001123456,
    "ErrorMessage": "test error message",
    "Success": true
}

Error codes

For a list of error codes, visit the API Error Center.