Updated on 2025-02-17 GMT+08:00

Importing Synchronization Objects

Real-time synchronization supports the import of objects through files. After a task is created, you can import object files on the Set Synchronization Task page.

Precautions

  • Only Windows Microsoft Excel 97-2003 (*.xls), 2007, and later (*.xlsx) files can be imported. The downloaded compressed package provides the templates of the two versions.
  • The file name can contain only spaces, letters, digits, hyphens (-), underscores (_), and parentheses.
  • The object information in the template must be filled in according to the format in the Excel file. The database object name (such as the database name, schema name, and table name) is case sensitive cannot contain the following characters: <>.". Object names starting or ending with spaces are not supported.
  • The task in the configuration supports table-level synchronization, database-level synchronization, or file import mode. Each time you switch to a new mode, the selected or imported database objects are cleared, and you need to select or import them again.
  • If you want to import a file for mapping, fill in the first and second columns of the file based on the template. If the first two columns of a row are left blank, the row will be ignored.
  • For the task created using the file import mode, database-level and table-level synchronization are not supported after the task is started.
  • If you edit a task, the imported file must contain information about all objects. Importing only the updated objects is not allowed.
  • If you edit a task again, the objects that have been synchronized cannot be mapped again. Ensure that the object names remain unchanged after the mapping.
  • If you edit a task again, the exported object information is the synchronized object information.
  • If the verification fails after the file is uploaded, click View Failure Details to download the error information.
  • The object names entered in the Excel file must use the same letter case as the source object names.
  • The task for synchronizing data from Oracle to GaussDB supports partition import. In the import template, enter the partition names in the Partitions column and separate them with commas (,). If the Partitions column is left empty, all partitions in the table are synchronized by default. If there are level-2 partitions, enter the names of the level-2 partitions. Partitions cannot be added or deleted for the selected table when the task is edited, partitions can be added to new tables.
  • Table name mapping and topic mapping are supported for synchronization from GaussDB Centralized to Kafka, from GaussDB Distributed to Kafka, and from MySQL to Kafka. For details, see the procedure.

Procedure

  1. On the Set Synchronization Task page, click Import object file in the Synchronization Object field.

    Figure 1 Importing an object file

  2. Click Download Template.
  3. Download the template and enter information about the objects to be imported.
  4. Click Select File. In the displayed dialog box, select the edited template.
  5. Click Upload.

Table name mapping and topic mapping are supported during object file import for synchronization from MySQL to Kafka and from GaussDB to Kafka.

  1. On the Set Synchronization Task page, click Import object file in the Synchronization Object field.

    Figure 2 Importing an object file

  2. Select Table name mapping or Topic mapping. You can select only one mapping type.

    Select the mapping type of the object file to be imported, download the template, fill in the Excel file, and add and upload the file.