Creates a data import ticket to import data into a specified database.
Operation description
This operation applies only to database instances in Security Collaboration control mode.
For more information about this feature, see Data Import.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dms:CreateDataImportOrder |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Comment |
string |
Yes |
The purpose or objective of the data import. Helps reduce unnecessary communication. |
test |
| RelatedUserList |
array |
No |
The stakeholders of the data import. Stakeholders can view ticket details and assist in the approval process. Users who are not stakeholders, DMS administrators, or DBAs cannot view ticket details. |
|
|
integer |
No |
The user ID of a stakeholder. Specified stakeholders can view and collaborate on the ticket. Other users cannot view the ticket, except administrators and DBAs. |
51**** |
|
| Param |
object |
Yes |
The parameters of the ticket. |
|
| Classify |
string |
No |
The reason for the data import. |
test |
| AttachmentName |
string |
Yes |
The key of the attachment that contains the SQL statements used to import data. You can call the GetUserUploadFileJob operation to obtain the attachment key from the value of the AttachmentKey parameter. |
upload_big_file_test_orders |
| DbItemList |
array<object> |
Yes |
The database to which you want to import data. You can specify only one database. |
|
|
object |
No |
Database information. |
||
| DbId |
integer |
Yes |
The database ID. The database can be physical or logical.
|
1860**** |
| Logic |
boolean |
Yes |
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. |
false |
| FileType |
string |
Yes |
The file format for the data import. Valid values:
Valid values:
|
CSV |
| FileEncoding |
string |
No |
The encoding of the destination database. Valid values:
|
AUTO |
| TableName |
string |
No |
The destination table for CSV data import. Note
This parameter is required if you set the FileType parameter to CSV. |
Table_text |
| InsertType |
string |
No |
The write mode for CSV data in the destination table. Valid values:
Note
This parameter is required if you set the FileType parameter to CSV. |
INSERT |
| CsvFirstRowIsColumnDef |
boolean |
No |
The type of the CSV file. Valid values:
Note
This parameter is required if you set the FileType parameter to CSV. |
true |
| IgnoreError |
boolean |
No |
Whether to skip errors during execution. Valid values:
|
false |
| ImportMode |
string |
No |
The import mode. Valid values:
|
FAST_MODE |
| RollbackSQL |
string |
No |
The SQL statements used to roll back the data import. Note
This parameter is required if you set the RollbackSqlType parameter to TEXT. |
empty |
| RollbackAttachmentName |
string |
No |
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. |
rollback.sql |
| RollbackSqlType |
string |
No |
The format of the rollback SQL statements. Valid values:
|
TEXT |
| ExecMode |
string |
No |
The ticket execution mode. Valid values:
|
COMMITOR |
| AttachmentKey |
string |
No |
The key of the attachment that provides additional instructions for the ticket. You can call the GetUserUploadFileJob operation to obtain the attachment key. |
order_attachment.txt |
| Tid |
integer |
No |
The ID of the tenant. You can call the GetUserActiveTenant or ListUserTenants operation to obtain the tenant ID. |
3*** |
| RealLoginUserUid |
string |
No |
The UID of the Alibaba Cloud account that calls this operation. |
21400447956867**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The ID of the request. |
0C1CB646-1DE4-4AD0-B4A4-7D47DD52E931 |
| Success |
boolean |
Whether the request was successful. Valid values:
|
true |
| ErrorMessage |
string |
The error message returned if the request fails. |
UnknownError |
| ErrorCode |
string |
The error code returned if the request fails. |
UnknownError |
| CreateOrderResult |
array |
The ID of the ticket. |
|
|
integer |
Ticket ID. |
1**** |
Examples
Success response
JSON format
{
"RequestId": "0C1CB646-1DE4-4AD0-B4A4-7D47DD52E931",
"Success": true,
"ErrorMessage": "UnknownError",
"ErrorCode": "UnknownError",
"CreateOrderResult": [
0
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.