Creates a ticket for importing data to Data Management (DMS).
For more information about the Large Data Import feature, see Import data.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | CreateDataImportOrder |
The operation that you want to perform. Set the value to CreateDataImportOrder. |
| Comment | String | Yes | test |
The purpose or objective of the data import. This parameter is used to help reduce unnecessary communication. |
| RelatedUserList | Array of Long | No | 51**** |
The stakeholders of the data import. All stakeholders can view the ticket details and assist in the approval process. Irrelevant users other than DMS administrators and database administrators (DBAs) are not allowed to view the ticket details. |
| Param | Object | Yes |
The parameters of the ticket. |
|
| Classify | String | No | test |
The reason for the data import. |
| AttachmentName | String | Yes | order_text |
The key of the attachment that contains the SQL statements used to import data. You can call the GetUserUploadFileJob operation to the attachment key from the value of the AttachmentKey parameter. |
| DbItemList | Array | Yes |
The database to which you want to import data. You can specify only one database. |
|
| DbId | Long | Yes | 1860**** |
The ID of the database. The database can be a physical database or a logical database.
|
| Logic | Boolean | Yes | false |
Specifies whether the database is a logical database. Valid values:
Note If you set this parameter to true, the database that you specify must be a logical database.
|
| FileType | String | Yes | CSV |
The format of the file for the data import. Valid values:
|
| FileEncoding | String | No | AUTO |
The encoding algorithm to be used by the destination database. Valid values:
|
| TableName | String | No | Table_text |
The destination table to which you want to import the data in the CSV format. Note This parameter is required if you set the FileType parameter to CSV.
|
| InsertType | String | No | INSERT |
The mode in which the data in the CSV format is to be written to the destination table. Valid values:
Note This parameter is required if you set the FileType parameter to CSV.
|
| CsvFirstRowIsColumnDef | Boolean | No | true |
The type of the CSV file. Valid values:
Note This parameter is required if you set the FileType parameter to CSV.
|
| IgnoreError | Boolean | No | false |
Specifies whether to skip an error that occurs. Valid values:
|
| ImportMode | String | No | FAST_MODE |
The import mode. Valid values:
|
| RollbackSQL | String | No | empty |
The SQL statements used to roll back the data import. Note This parameter is required if you set the RollbackSqlType parameter to TEXT.
|
| RollbackAttachmentName | String | No | rollback.sql |
The key of the attachment that contains the SQL statements used to roll back the data import. You can call the GetUserUploadFileJob operation to obtain the attachment key from the value of the AttachmentKey parameter. Note This parameter is required if you set the RollbackSqlType parameter to ATTACHMENT.
|
| RollbackSqlType | String | No | TEXT |
The format of the SQL statements used to roll back the data import. Valid values:
|
| AttachmentKey | String | No | order_attachment.txt |
The key of the attachment that provides more instructions for the ticket. You can call the GetUserUploadFileJob operation to obtain the attachment key from the value of the AttachmentKey parameter. |
| Tid | Long | No | 3*** |
The ID of the tenant. You can call the GetUserActiveTenant or ListUserTenants operation to obtain the tenant ID. |
| RegionId | String | No | cn-hangzhou |
The ID of the region in which DMS is activated. For more information, see RegionID parameter. |
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| RequestId | String | 0C1CB646-1DE4-4AD0-B4A4-7D47DD52E931 |
The ID of the request. |
| Success | Boolean | true |
Indicates whether the request is successful. Valid values:
|
| ErrorMessage | String | UnknownError |
The error message returned if the request fails. |
| ErrorCode | String | UnknownError |
The error code returned if the request fails. |
| CreateOrderResult | Array of Long | 1**** |
The ID of the ticket. |
Examples
Sample requests
http(s)://dms-enterprise.aliyuncs.com/?Action=test
&Comment=test
&RelatedUserList=[51****]
&Param={"Classify":"test","AttachmentName":"order_text","DbItemList":[{"DbId":1860****,"Logic":false}],"FileType":"CSV","FileEncoding":"AUTO","TableName":"Table_text","InsertType":"INSERT","CsvFirstRowIsColumnDef":true,"IgnoreError":false,"ImportMode":"FAST_MODE"}
&AttachmentKey=order_attachment.txt
&<Common request parameters>
Sample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<CreateDataImportOrderResponse>
<RequestId>0C1CB646-1DE4-4AD0-B4A4-7D47DD52E931</RequestId>
<Success>true</Success>
<CreateOrderResult>1****</CreateOrderResult>
</CreateDataImportOrderResponse>
JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "0C1CB646-1DE4-4AD0-B4A4-7D47DD52E931",
"Success" : true,
"CreateOrderResult" : [ "1****" ]
}
Error codes
For a list of error codes, visit the API Error Center.