As a data synchronization framework, DataX abstracts the synchronization of different data sources into Reader plug-in that reads data from the source data source and Writer plug-in that writes data to the target. Theoretically, DataX framework can support data synchronization of any data source type. At the same time, the DataX plug-in system serves as a set of ecosystem. Every time a new data source is connected, the newly added data source can realize the interconnection with the existing data source.

I. Environment construction

Java Installation (Java >=1.6)

Python installation (Python>=2.6)

Choose the appropriate JDK for your system

Download datax locally

Download :github.com/alibaba/Dat…

Decompress the file to a local directory and go to the bin directory to start the synchronization job:

3. Prepare the JSON configuration file

Save the configuration file to the bin directory.

Copy mysql data from another server to local mysql server;



I will not introduce the specific read and write JSON format. The details are as follows:Github.com/alibaba/Dat…

Python datax.py.. /job.json (configuration file) If the configuration file is successful, the following information is displayed:

python datax.py {YOUR_JOB.json}
Copy the code

{your_job. json} is the configuration file you wrote with a path; Like the demo path THAT I wrote; . /job.json indicates the job.json file in the upper directory of the bin path.

Note that the field names can be different but the number and type of fields must be the same.