DATAX-based methods, equipment, and media for automatic migration of heterogeneous databases.
By automatically acquiring migration parameters and dynamically identifying database table and field names using the DATAX tool, and generating migration task files, the problems of poor adaptability and low efficiency in database migration are solved, enabling efficient and reliable automatic migration of heterogeneous databases.
Patent Information
- Application Number
- CN202510948268.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-10
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2045-07-10
AI Technical Summary
Existing database migration technologies struggle to achieve seamless migration between different database management systems and have weak perception of table structures, resulting in high labor costs, difficulty in guaranteeing data consistency and accuracy, and cumbersome and inefficient configuration of synchronization tasks.
The DATAX tool automatically obtains migration parameters, dynamically detects the table names and field names of the target database, automatically generates a dataX job json file, and executes dataX commands to perform the migration, achieving automatic migration without the need for manual configuration of table names.
It improves the adaptability and efficiency of database migration, reduces manual operations, and ensures the reliability and accuracy of data migration.
Smart Images

Figure CN120429287B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of database migration technology, and in particular to a method, device and medium for automatic migration of heterogeneous databases based on DATAX. Background Technology
[0002] In the context of rapid development in information technology, data has become a crucial component of a company's core assets. As companies accelerate their digital transformation, the role of databases in data storage, management, and analysis is becoming increasingly prominent. Database migration and synchronization, as key technologies for system upgrades, data integration, and multi-platform collaboration, are widely used in enterprise information systems.
[0003] Currently, most database synchronization solutions rely on data source drivers, incremental log capture mechanisms (such as Binlog and WAL), task scheduling frameworks, and manually configured data models. While these solutions can be effective in specific environments, they are only suitable for specific database types or versions and are difficult to migrate seamlessly between different database management systems. Secondly, current data migration methods have weak awareness of table structures. Developers need to specify the structure information of each table to be migrated, which not only increases labor costs but also poses risks to data consistency and accuracy. If the table structure changes during migration, traditional methods require reconfiguring field mappings, which can easily lead to problems such as missing fields, disordered order, or data write failures. Furthermore, when configuring table-level data synchronization tasks, most tools rely on static task template files and lack dynamic detection and response mechanisms for database metadata, making batch configuration of synchronization tasks extremely cumbersome and inefficient. Summary of the Invention
[0004] This application provides a method, device, and medium for automatic migration of heterogeneous databases based on DATAX, which solves the technical problems of poor adaptability and low migration efficiency of existing batch automatic database migration methods.
[0005] In a first aspect, embodiments of this application provide a method for automatic migration of heterogeneous databases based on DATAX. The method includes: obtaining data migration parameters and determining an empty set of jobs directory based on the status of the jobs directory; obtaining the migration database table names by traversing the table names of the database types based on the data migration parameters; determining a list of field names by querying a dynamically aware list of field names based on the table names of the migrated database; performing field escaping on the list of field names to obtain a list of database field names; concatenating the data migration parameters and the list of database field names to obtain a dataX job json file; saving the dataX job json file to an empty set of jobs directory and executing the dataX command to migrate, thereby obtaining the automatic database migration status.
[0006] In one implementation of this application, the empty set of jobs directory is determined by judging the status of the jobs directory. Specifically, this includes: querying the jobs directory; if the jobs directory exists, deleting the current jobs directory and recreating the empty set of jobs directory; if the jobs directory does not exist, creating the empty set of jobs directory.
[0007] In one implementation of this application, the data migration parameters include: source database information, target database information, and a list of table names. Based on the data migration parameters, the table names of the migration database are obtained by traversing the table names of the database types. Specifically, this includes: determining the table synchronization requirements by analyzing the list of table names; and based on the table synchronization requirements, querying all table names of the database corresponding to the target database information and assigning the list of table names to all the table names to obtain the table names of the migration database.
[0008] In one implementation of this application, the list of field names is determined by querying a list of dynamically aware field names based on the table name of the database to be migrated. Specifically, this includes: determining dynamically aware data based on the target database information through SQL field order configuration; and querying the target database using SQL statements based on the dynamically aware data to determine the list of field names.
[0009] In one implementation of this application, the field name list is escaped to obtain the database field name list. Specifically, this includes: obtaining the database type of the data migration parameters, and determining the escape characters based on the database type through field escaping configuration; adding escape characters to the field names in the field name list to obtain the database field name list.
[0010] In one implementation of this application, data migration parameters and a list of database field names are concatenated to obtain a dataX job json file. Specifically, this includes concatenating source database information, target database information, and a list of database field names to obtain a dataX job json file.
[0011] In one implementation of this application, the database automatic migration status is obtained by executing the dataX command to migrate the database. Specifically, this includes: traversing all files with the extension .json in the jobs directory and transferring the database to the .json file by executing the dataX command; determining a .json file with the same name based on the transferred database .json file through migration log redirection; changing the extension of the .json file with the same name to .log to obtain the execution log corresponding to the dataX task, and obtaining the database automatic migration status based on the execution log corresponding to the dataX task.
[0012] In one implementation of this application, after executing the dataX command to migrate and obtaining the database automatic migration status, the method further includes: visually displaying the execution status line of the dataX task.
[0013] Secondly, embodiments of this application also provide a heterogeneous database automatic migration device based on DATAX, characterized in that the device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: obtain data migration parameters and determine an empty set of jobs directory by judging the status of the jobs directory; obtain the migration database table name by traversing the table names of the database type based on the data migration parameters; determine the field name list by querying the table name dynamically perceived by the table name according to the migration database table name; perform field escaping on the field name list to obtain the database field name list; concatenate the data migration parameters and the database field name list to obtain a dataX job json file; save the dataX job json file to the empty set of jobs directory, and execute the dataX command migration to obtain the database automatic migration status.
[0014] Thirdly, embodiments of this application also provide a non-volatile computer storage medium for automatic migration of heterogeneous databases based on DATAX, storing computer-executable instructions. The computer-executable instructions are characterized by: obtaining data migration parameters and determining an empty set of jobs directory based on the job directory status; obtaining the migration database table names by traversing the table names of the database types based on the data migration parameters; determining a list of field names by querying a dynamically aware list of field names based on the table names of the migrated database; performing field escaping on the list of field names to obtain a list of database field names; concatenating the data migration parameters and the list of database field names to obtain a dataX jobjson file; saving the dataX jobjson file to an empty set of jobs directory and executing the dataX command to migrate, thereby obtaining the automatic database migration status.
[0015] This application provides a method, device, and medium for automatic migration of heterogeneous databases based on DATAX. By automatically reading all table information in the target database without manual configuration of table names, and making intelligent judgments based on its data status, an executable data migration task file is automatically generated. This solves the technical problems of poor adaptability and low migration efficiency of existing batch automatic database migration methods, realizes batch automatic database migration, frees up manual operation, and improves the efficiency and reliability of data migration work. Attached Figure Description
[0016] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0017] Figure 1 A flowchart of an automatic migration method for heterogeneous databases based on DATAX provided in this application embodiment;
[0018] Figure 2 This is a schematic diagram of the internal structure of an automatic migration device for heterogeneous databases based on DATAX, provided as an embodiment of this application. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0020] This application provides a method, device, and medium for automatic migration of heterogeneous databases based on DATAX. By automatically reading all table information in the target database without manual configuration of table names, and making intelligent judgments based on its data status, an executable data migration task file is automatically generated. This solves the technical problems of poor adaptability and low migration efficiency of existing batch automatic database migration methods, realizes batch automatic database migration, frees up manual operation, and improves the efficiency and reliability of data migration work.
[0021] The technical solutions proposed in the embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0022] Figure 1 This document provides a flowchart of an automatic migration method for heterogeneous databases based on DATAX, as illustrated in an embodiment of this application. Figure 1 As shown in the figure, the automatic migration method for heterogeneous databases based on DATAX provided in this application embodiment specifically includes the following steps:
[0023] Step 101: Obtain data migration parameters and determine the empty set of jobs directory by judging the status of the jobs directory.
[0024] For example, DATAX is a data synchronization tool, mainly used in data migration, backup, synchronization and integration scenarios in the big data field. The jobs directory is the storage directory for the jobs command. In order to ensure that the jobs directory exists and is an empty set in the batch automatic migration of the database, the empty set jobs directory is determined by judging the status of the jobs directory, thus realizing the real-time construction and selection of the empty set jobs directory.
[0025] Specifically, the empty set of jobs directory is determined by judging the status of the jobs directory, including: querying the jobs directory; if the jobs directory exists, deleting the current jobs directory and recreating the empty set of jobs directory; if the jobs directory does not exist, creating the empty set of jobs directory.
[0026] In one embodiment, the system accepts user input parameters "Source Database Information," which should include the source database's HOST, PORT, DATABASE, username, password, and database type; it also accepts user input parameters "Target Database Information," which should include the target database's HOST, PORT, DATABASE, username, password, and database type; and it accepts user input parameters "Table Name List," which represents a list of database table names that the user wishes to migrate.
[0027] If the jobs directory exists, delete it and recreate an empty jobs directory; if the jobs directory does not exist, create an empty jobs directory directly, ensuring that the jobs directory exists and is empty.
[0028] Step 102: Based on the data migration parameters, traverse through the table names of the database types to obtain the migration database table names.
[0029] For example, this application obtains the migration database table name by traversing the table name of the database type based on the data migration parameters, thereby realizing the assignment of the migration database table and improving the stability and efficiency of automatic database migration.
[0030] Specifically, the data migration parameters include: source database information, target database information, and a list of table names. Based on the data migration parameters, the table names of the migration database are obtained by traversing the table names of the database types. Specifically, this includes: judging the table synchronization requirements of the table name list to determine the table synchronization requirements; based on the table synchronization requirements, querying all table names of the database corresponding to the target database information, and assigning the table name list to all table names to obtain the table names of the migration database.
[0031] In one embodiment, the table name list is traversed. If the parameter is empty, it means that the user wants to synchronize all tables. Based on the target database information, all table names in the target database are queried, and the table name list is assigned to all table names. Then, the traversal is performed to obtain the table names of the migration database.
[0032] Since the target database may be of different types, different SQL statements should be implemented to query all table names in the database according to the database type. If the database type is ORACLE, the SQL statement is SELECT table_name FROM user_tables; if the database type is POSTGRESQL, the SQL statement is SELECT table_name.
[0033] FROM information_schema.tables WHERE table_schema = 'public' ANDtable_type = 'BASE TABLE'.
[0034] Step 103: Based on the table name of the database to be migrated, determine the list of field names by querying the list of field names dynamically perceived by the table name.
[0035] For example, if the source and target tables have the same structure but different field order, an error will occur if the column is configured as * in the dataX jobjson file. To avoid this type of error during automatic database migration, a list query of field names that is dynamically aware of the table name is used to avoid it.
[0036] Specifically, based on the table name of the migrated database, the list of field names is determined by querying the list of field names dynamically perceived by the table name. This includes: determining the table name dynamically perceived data based on the target database information and through SQL field order configuration; and determining the list of field names by querying the target database using SQL statements based on the table name dynamically perceived data.
[0037] In one embodiment, based on the migration database table name obtained through traversal, the SQL statement select count(1) is used to query the total number of data in the table according to the target database information. If the table in the target database contains data, the table is skipped or the data in the table is cleared.
[0038] Based on the migration database table names obtained through traversal, use SQL statements to query a list of all field names in the target database, based on the target database information.
[0039] Since the target database may be of different types, different SQL statements should be implemented to query the list of field names in the table according to the database type.
[0040] If the database type is PostgreSQL, the SQL should be: SELECT column_name FROM information_schema.columns WHERE table_schema = 'public' AND table_name = %s ORDER BYordinal_position.
[0041] It's important to note that if the source and target tables have the same structure but different field orders, an error will occur if the column is configured as * in the dataXjob JSON file. Dynamically monitoring the database status can prevent anomalies caused by different field orders. Therefore, it's necessary to configure the SQL field order in the query using a dynamically aware table name list to avoid these anomalies.
[0042] Step 104: Escape the field names in the list to obtain the database field name list.
[0043] For example, this application obtains a list of database field names by escaping the list of field names, thereby implementing naming processing of database keywords as field names and improving the accuracy and applicability of automatic database migration.
[0044] Specifically, the field name list is escaped to obtain the database field name list. This includes: obtaining the database type of the data migration parameters, and determining the escape characters based on the database type through the field escaping configuration; and adding escape characters to the field names in the field name list to obtain the database field name list.
[0045] In one embodiment, since users may use database keywords as field names, the list of field names needs to be escaped. The queried list of field names is iterated through, and escape characters are added to the field names according to the metadata database type and the target database type, generating separate source database field name lists and target database field name lists for the source and target databases, respectively.
[0046] Furthermore, MySQL / MariaDB can achieve escaping by wrapping fields in backticks, while PostgreSQL can achieve escaping by wrapping fields in double quotes.
[0047] Step 105: Concatenate the data migration parameters and the list of database field names to obtain the dataXjob json file.
[0048] Specifically, the data migration parameters and the list of database field names are concatenated to obtain the dataX jobjson file, including: concatenating the source database information, target database information, and the list of database field names to obtain the dataX job json file.
[0049] In one embodiment, a dataX job json file is constructed based on source database information, target database information, table names, a list of field names in the source database, and a list of field names in the target database.
[0050] Step 106: Save the dataX job json file to the empty set jobs directory, and execute the dataX command to migrate the database and obtain the database automatic migration status.
[0051] For example, this application saves the dataX job json file to the empty set jobs directory and executes the dataX command to migrate the database, thereby obtaining the automatic database migration status. It realizes the automatic reading of all table information in the target database and intelligent judgment based on its data status, thereby automatically generating an executable data migration task file and a visualization of the migration status, which improves the efficiency and reliability of data migration work.
[0052] Specifically, the dataX command is executed to migrate the database and obtain the automatic database migration status. This includes: traversing all files with the .json extension in the jobs directory and transferring the database to the .json file by executing the dataX command; based on the transferred .json file, determining a .json file with the same name through migration log redirection; changing the extension of the .json file with the same name to .log to obtain the execution log corresponding to the dataX task, and obtaining the automatic database migration status based on the execution log corresponding to the dataX task.
[0053] Furthermore, after executing the dataX command to migrate and obtaining the database automatic migration status, the method also includes: visually displaying the execution status line of the dataX task.
[0054] In one embodiment, the concatenated dataX job json file is saved in the created empty set jobs directory, with the file name being table_job.json. All files with the .json extension in the jobs directory are traversed, and the dataX command is executed to transfer the traversed json file for data migration.
[0055] Redirect the migration logs generated by the dataX command to a file with the same name as the JSON file, but with the .log extension. This ensures that each dataX task has its own execution log. If a dataX command fails, log and display the failure; if it succeeds, log and display the success.
[0056] If the system is upgraded, the MySQL database needs to be replaced with a Postgres database. After the database adaptation is completed, the historical data in the MySQL database needs to be migrated to the Postgres database.
[0057] Enter the source database information, i.e., the MySQL database connection information, including the database address, username, password, etc.; enter the target database information, including the database address, username, password, etc.; enter the table names to be migrated; if you need to migrate data from all tables, you don't need to enter this; create a jobs directory and ensure that the jobs directory is empty; construct a database connection using the source database information and execute the SQL statement SELECT TABLE_NAME FROM information_schema.TABLESWHERE TABLE_SCHEMA = 'database_name' to query all table names in the source database.
[0058] Construct a database connection using the target database information and execute the SQL statement select count(1) from tables. If there is data in the target database table, skip the table and do not perform migration, or delete the data in the target database table and perform migration; traverse all table names in the meta database and use SQL statements to query a list of all field names in the target database based on the target database information.
[0059] Based on the source database information, target database information, table names, a list of field names in the source database, and a list of field names in the target database, concatenate the dataX job JSON file. In the dataX job JSON file, use backticks to enclose all field names in mysqlreader and use double quotes to enclose all field names in postgresqlwriter to avoid field name conflicts with keywords that could cause migration failure.
[0060] Save the assembled dataX job json file to the jobs directory; iterate through the .json files in the jobs directory and execute the dataX command to perform the data migration.
[0061] The above are embodiments of the method proposed in this application. Based on the same inventive concept, embodiments of this application also provide an automatic migration device for heterogeneous databases based on DATAX, the structure of which is as follows: Figure 2 As shown.
[0062] Figure 2 This is a schematic diagram of the internal structure of a heterogeneous database automatic migration device based on DATAX, provided as an embodiment of this application. Figure 2 As shown, the device includes:
[0063] At least one processor 201;
[0064] And a memory 202 that is communicatively connected to at least one processor;
[0065] The memory 202 stores instructions executable by at least one processor, which are executed by at least one processor 201 to enable at least one processor 201 to:
[0066] Obtain data migration parameters and determine an empty set of jobs directory based on the job directory status; based on the data migration parameters, traverse by table name of database type to obtain the migration database table name; based on the migration database table name, query the list of field names using the table name dynamic awareness list to determine the field name list; perform field escaping on the field name list to obtain the database field name list; concatenate the data migration parameters and the database field name list to obtain the dataX job json file; save the dataX job json file to the empty set of jobs directory, and execute the dataX command to migrate, obtaining the database automatic migration status.
[0067] Some embodiments of this application provide corresponding to Figure 1 A non-volatile computer storage medium for automatic migration of heterogeneous databases based on DATAX, storing computer-executable instructions, wherein the computer-executable instructions are configured as follows:
[0068] Obtain data migration parameters and determine an empty set of jobs directory based on the job directory status; based on the data migration parameters, traverse by table name of database type to obtain the migration database table name; based on the migration database table name, query the list of field names using the table name dynamic awareness list to determine the field name list; perform field escaping on the field name list to obtain the database field name list; concatenate the data migration parameters and the database field name list to obtain the dataX job json file; save the dataX job json file to the empty set of jobs directory, and execute the dataX command to migrate, obtaining the database automatic migration status.
Claims
1. A method for automatic migration of heterogeneous databases based on DATAX, characterized in that, The method includes: Obtain data migration parameters and determine the empty set of jobs directory by judging the status of the jobs directory; Based on the data migration parameters, the migration database table names are obtained by traversing the table names of the database types; Based on the table name of the migrated database, the list of field names is determined by querying the list of field names dynamically aware of the table name; The field name list is escaped to obtain the database field name list; The data migration parameters and the list of database field names are concatenated to obtain a dataX jobjson file; Save the dataX job json file to the empty set jobs directory, and execute the dataX command to migrate the database and obtain the database automatic migration status; The empty set of jobs directory is determined by checking the status of the jobs directory, specifically including: Query the jobs directory. If the jobs directory exists, delete the current jobs directory and recreate the empty set jobs directory. If the jobs directory does not exist, create the empty set of jobs directory; The data migration parameters include: source database information, target database information, and a list of table names; Based on the data migration parameters, the migration database table names are obtained by traversing the table names of the database types, specifically including: The table name list is used to determine the table synchronization requirements. Based on the table synchronization requirement, query all table names of the database corresponding to the target database information, and assign the table name list to all table names to obtain the table names of the migration database. The data migration parameters include: source database information, target database information, and a list of table names; Based on the data migration parameters, the migration database table names are obtained by traversing the table names of the database types, specifically including: The table name list is used to determine the table synchronization requirements. Based on the table synchronization requirement, query all table names of the database corresponding to the target database information, and assign the table name list to all table names to obtain the table names of the migration database. The data migration parameters and the list of database field names are concatenated to obtain a dataX jobjson file, specifically including: The source database information, target database information, and the list of database field names are concatenated to obtain the dataX job json file.
2. The method for automatic migration of heterogeneous databases based on DATAX according to claim 1, characterized in that, Based on the table names of the migrated database, the list of field names is determined by querying a dynamically aware list of field names, specifically including: Based on the target database information, table names are dynamically determined and data is dynamically perceived through SQL field order configuration; Based on the table names, dynamically sense the data and use SQL statements to query the target database to determine the list of field names.
3. The method for automatic migration of heterogeneous databases based on DATAX according to claim 1, characterized in that, The list of field names is escaped to obtain a list of database field names, specifically including: Obtain the database type of the data migration parameters, and determine the escape characters based on the database type and the field escaping configuration; Add the escape character to the field names in the field name list to obtain the database field name list.
4. The method for automatic migration of heterogeneous databases based on DATAX according to claim 1, characterized in that, Executing the dataX command for migration will retrieve the database automatic migration status, which includes: Iterate through all files with the .json extension in the jobs directory and transfer the database to the .json file by executing the dataX command; Based on the .json file transmitted from the database, a .json file with the same name is determined through migration log redirection; Change the extension of the .json file with the same name to .log to obtain the execution log corresponding to the dataX task, and obtain the automatic migration status of the database based on the execution log corresponding to the dataX task.
5. The method for automatic migration of heterogeneous databases based on DATAX according to claim 4, characterized in that, After executing the dataX command to migrate and obtaining the database automatic migration status, the method further includes: The execution status of the dataX task is visualized.
6. An automatic migration device for heterogeneous databases based on DATAX, characterized in that, The device includes: At least one processor; And, a memory communicatively connected to the at least one processor; The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to: Obtain data migration parameters and determine the empty set of jobs directory by judging the status of the jobs directory; Based on the data migration parameters, the migration database table names are obtained by traversing the table names of the database types; Based on the table name of the migrated database, the list of field names is determined by querying the list of field names dynamically aware of the table name; The field name list is escaped to obtain the database field name list; The data migration parameters and the list of database field names are concatenated to obtain a dataX jobjson file; Save the dataX job json file to the empty set jobs directory, and execute the dataX command to migrate the database and obtain the database automatic migration status; The empty set of jobs directory is determined by checking the status of the jobs directory, specifically including: Query the jobs directory. If the jobs directory exists, delete the current jobs directory and recreate the empty set jobs directory. If the jobs directory does not exist, create the empty set of jobs directory; The data migration parameters include: source database information, target database information, and a list of table names; Based on the data migration parameters, the migration database table names are obtained by traversing the table names of the database types, specifically including: The table name list is used to determine the table synchronization requirements. Based on the table synchronization requirement, query all table names of the database corresponding to the target database information, and assign the table name list to all table names to obtain the table names of the migration database. The data migration parameters include: source database information, target database information, and a list of table names; Based on the data migration parameters, the migration database table names are obtained by traversing the table names of the database types, specifically including: The table name list is used to determine the table synchronization requirements. Based on the table synchronization requirement, query all table names of the database corresponding to the target database information, and assign the table name list to all table names to obtain the table names of the migration database. The data migration parameters and the list of database field names are concatenated to obtain a dataX jobjson file, specifically including: The source database information, target database information, and the list of database field names are concatenated to obtain the dataX job json file.
7. A non-volatile computer storage medium for automatic migration of heterogeneous databases based on DATAX, storing computer-executable instructions, characterized in that, The computer-executable instructions are set as follows: Obtain data migration parameters and determine the empty set of jobs directory by judging the status of the jobs directory; Based on the data migration parameters, the migration database table names are obtained by traversing the table names of the database types; Based on the table name of the migrated database, the list of field names is determined by querying the list of field names dynamically aware of the table name; The field name list is escaped to obtain the database field name list; The data migration parameters and the list of database field names are concatenated to obtain a dataX jobjson file; Save the dataX job json file to the empty set jobs directory, and execute the dataX command to migrate the database and obtain the database automatic migration status; The empty set of jobs directory is determined by checking the status of the jobs directory, specifically including: Query the jobs directory. If the jobs directory exists, delete the current jobs directory and recreate the empty set jobs directory. If the jobs directory does not exist, create the empty set of jobs directory; The data migration parameters include: source database information, target database information, and a list of table names; Based on the data migration parameters, the migration database table names are obtained by traversing the table names of the database types, specifically including: The table name list is used to determine the table synchronization requirements. Based on the table synchronization requirement, query all table names of the database corresponding to the target database information, and assign the table name list to all table names to obtain the table names of the migration database. The data migration parameters include: source database information, target database information, and a list of table names; Based on the data migration parameters, the migration database table names are obtained by traversing the table names of the database types, specifically including: The table name list is used to determine the table synchronization requirements. Based on the table synchronization requirement, query all table names of the database corresponding to the target database information, and assign the table name list to all table names to obtain the table names of the migration database. The data migration parameters and the list of database field names are concatenated to obtain a dataX jobjson file, specifically including: The source database information, target database information, and the list of database field names are concatenated to obtain the dataX job json file.
Citation Information
Patent Citations
Method and system for realizing distributed heterogeneous database migration based on DataX and medium
CN116521652A