Parameter | Description |
Database | The database to which data is to be imported. You can select only one database from the Database drop-down list at a time. Note If the database is managed in Flexible Management or Stable Change mode, make sure that you have logged on to the database. Otherwise, the database is not displayed in the Database drop-down list. |
Execution Method | The way in which you want the ticket to be run. By default, Ticket Submitter Executes Upon Approval is selected. You can also set this parameter to one of the following values: |
File Encoding | The encoding method of the database. By default, Automatic Identification is selected. You can also set this parameter to one of the following values: |
Import Mode | The mode in which data is to be imported. Valid values: Speed Mode: In the Execute step, the SQL statements in the uploaded file are read and directly executed to import data to the destination database. The speed mode is less secure but faster than the security mode. Note By default, Speed Mode is disabled for a database instance based on security rules. You can enable the speed mode by performing the following operations: Go to the Details page of the security rule set that is applied to the database instance and click the tab. In the list below the Basic Configuration Item checkpoint, find the "Whether data import supports selecting speed mode" rule and click Edit in the Actions column. In the dialog box that appears, turn on Configuration Value. Security Mode: In the Precheck step, the uploaded file is parsed, and the SQL statements or CSV file data in the uploaded file is cached. In the Execute step, the cached SQL statements are read and executed to import data, or the cached CSV file data is read and imported to the destination database. The security mode is more secure but slower than the speed mode.
|
File Type | The format of the file for the data import. Valid values: SQL Script: By default, you can use only the INSERT and REPLACE statements to import data to database instances that are managed in Security Collaboration mode. If you want to use other SQL statements to import data, modify the security rules for data import as a database administrator (DBA) or DMS administrator. You can modify the security rules by performing the following operations: Go to the Details page of the security rule set that is applied to the database instance and click the SQL Correct tab. In the list below the Batch Data import rules checkpoint, modify the security rules based on your business requirements. CSV: The delimiters in the file must be commas (,). Excel: The file can contain table headers and data, or contain only data. Table headers contain the attributes of data. Note If you set this parameter to CSV or Excel, make sure that you have created a table for data import before you import data.
|
Destination Table Name | The destination table to which data is to be imported. Note This parameter is displayed after you set the File Type parameter to CSV or Excel. |
Data Location | The type of the file whose data is to be imported. Valid values: |
Write Mode | The mode that you want to use to write the imported data to the destination table. Valid values: INSERT: The database checks the primary key during data insertion. If duplicate primary key values are detected, an error is reported. INSERT_IGNORE: If the imported data contains data records that are the same as those in the destination table, the new data records are ignored. REPLACE_INTO: If the imported data contains a row that has the same value for the primary key or unique index as an existing row in the destination table, the system deletes the existing row and inserts the new row into the destination table.
Note You can use the INSERT INTO , INSERT IGNORE , or REPLACE INTO statement to write data to ApsaraDB RDS for MySQL, PolarDB for MySQL, PolarDB-X, AnalyticDB for MySQL, and ApsaraDB for OceanBase databases. You can use only the INSERT INTO statement to write data to other databases. |
Attachment | The file that you want to import. Valid values: File and Upload OSS Object. If you want to upload an object that is stored in Object Storage Service (OSS), first register the OSS data source with DMS. After the OSS data source is registered, click Upload OSS Object. In the Upload OSS Object dialog box, enter the file path. Example: examplefolder/example.sql . Note Supported file formats include SQL, CSV, TXT, XLSX, and ZIP. The file to be imported can be up to 5 GB in size. For more information about how to register an OSS data source with DMS, see Register an Alibaba Cloud database instance.
|
Other Options | Optional. Specifies whether to skip errors. By default, the check box is cleared. If an error occurs, DMS stops executing SQL statements and returns an error message. If you select the check box, DMS skips errors and continues to execute SQL statements.
|
SQL Statements for Rollback | |
Change Stakeholder | Optional. The stakeholders involved in the data import. All specified stakeholders can view the ticket details and take part in the approval process. Other users except for DMS administrators and DBAs are not allowed to view the ticket details. |