Updated on 2024-05-28 GMT+08:00

Configuring a Conversion Plan

Scenarios

Select the object to be converted and set the USER password.

Procedure

  1. In the navigation pane on the left, choose Schema Migration > Object Migration. The migration project list is displayed.
  2. Locate the project to be migrated and click Migrate in the Operation column.
  3. Click User Password in the upper left corner. In the displayed dialog box, configure New Password and Confirm Password.

    Figure 1 Conversion plan

  4. Select objects that you want to configure and click Skip Conversion and Convert.

    If the source database type is Oracle or MySQL and the target database type is distributed GaussDB, you can perform the following operations:

    • Replicating tables: Select one or more objects and click Replicate Table above the list. The object name is suffixed with "Replicate Table".
    • Modifying distribution mapping: locate an object whose Object Type is TABLE and click Distribution Mapping in the Object Type column. Change the distribution type to HASH or REPLICATION and click Apply. The object name is suffixed with "Replicate Table" or "HASH (column name)".
    • Deleting a distribution mapping: locate an object whose Object Type is TABLE and click Distribution Mapping in the Object Type column. Select Delete distributed mapping and click Apply. The suffix such as "Replicate Table" or "HASH (column name)"of the object is deleted.

      The rules for displaying hash distribution mapping fields are as follows:

      • There is a primary key or unique constraint in the table.
        1. If there is only a primary key, all fields that meet the data type constraints of GaussDB distribution columns in the primary key are displayed.
        2. If there is only a unique constraint, all fields that meet the data type constraints of GaussDB distribution columns in the unique constraint are displayed.
        3. If both the primary key and unique constraint exist, the public fields of the primary key and unique constraint are used.
        4. Based on the preceding conditions, if no fields are displayed on the page, the HASH distribution mapping cannot be selected.
      • If no primary key or unique constraint exists:
        1. All fields that meet the data type constraints of GaussDB distribution columns in the table are displayed.
        2. Based on the preceding conditions, if no fields are displayed on the page and the HASH distribution mapping cannot be selected.

  5. Click Convert Specified Objects above the list.

    Figure 2 Converting specified objects
    • Click Download file template to download an Excel file.
      • In the Excel file, the first column indicates schema, the second column indicates object type, and the third column indicates object name. The three columns specify an object and cannot be empty.
    • Click Add File to upload a file where there are objects to be converted.
      • The maximum size of the file is 30 MB, and the maximum number of rows is 65,535 (excluding the table header). If the content is incorrect, you can click View Error in the upload result to view the error cause. After the error is rectified, you can upload the file again.
      • After the file is uploaded successfully, the conversion status of objects is automatically updated.