当前位置:网站首页>DataX User Guide
DataX User Guide
2022-06-24 08:41:00 【An unreliable programmer】
DataX
DataX It is an offline data synchronization tool widely used in Alibaba group / platform , Implementation include MySQL、Oracle、SqlServer、Postgre、HDFS、Hive、ADS、HBase、TableStore(OTS)、MaxCompute(ODPS)、DRDS And other efficient data synchronization functions among various heterogeneous data sources .
DataXgit Address
install
Direct download DataX tool kit :DataX Download address
Download and unzip to a local directory , Get into bin Catalog , You can run the synchronization job :shell cd {YOUR_DATAX_HOME}/bin python datax.py {YOUR_JOB.json}
Self test script :
python {YOUR_DATAX_HOME}/bin/datax.py {YOUR_DATAX_HOME}/job/job.json
Use
1. Generate job.json Example file for
cd {
YOUR_DATAX_HOME}/bin
python datax.py -r mysqlreader -w postgresqlwriter
The instance file will be generated
2. Copy the instance file to .json In the document . Modify the configuration items , example json The file is shown below :
{
"job": {
"content": [
{
"reader": {
"name": "mysqlreader",
"parameter": {
"column": ["id" , "fid" , "name" , "type" , "ab"],
"connection": [
{
"jdbcUrl": ["jdbc:mysql://192.168.0.111:3306/etl"],
"table": ["district"]
}
],
"password": "root",
"username": "root",
"where": ""
}
},
"writer": {
"name": "postgresqlwriter",
"parameter": {
"column": ["id" , "fid" , "name" , "type" , "ab"],
"connection": [
{
"jdbcUrl": "jdbc:postgresql://192.168.0.111:5432/etl",
"table": ["district"]
}
],
"password": "root",
"postSql": [],
"preSql": [],
"username": "postgres"
}
}
}
],
"setting": {
"speed": {
"channel": 5
}
}
}
}
instructions
- DataX Unable to synchronize table structure , So when synchronizing data , Must ensure writer Table in already exists .
- column It's best not to use... For fields “*” Instead of , Make sure that you can write whatever fields you need to synchronize .WARN: There is some risk in the column configuration in your configuration file . Because you are not configured to read the columns of the database table , When the number of fields in your table 、 When the type changes , It may affect the correctness of the task and even run in error .
- Writing to the database is generally not recommended , Number of channels > 32
边栏推荐
- ZUCC_ Principles of compiling language and compilation_ Experiment 03 getting started with compiler
- 【力扣10天SQL入门】Day2
- Smart power plant: how to make use of easycvr to build a safe, stable, green and environment-friendly intelligent inspection platform
- Take my brother to do the project. It's cold
- 小黑ai4code代码baseline啃食1
- uniapp 热更新后台管理
- Pat 1157: school anniversary
- How to handle the problem that calling easycvr address integration cannot be played through easyplayer player?
- 2021-03-04 comp9021 class 6 notes
- The JS macro of WPS implements the separation method of picture text in the same paragraph
猜你喜欢

ZUCC_ Principles of compiling language and compilation_ Experiment 01 language analysis and introduction

ZUCC_编译语言原理与编译_实验03 编译器入门

RCNN、Fast-RCNN、Faster-RCNN介绍

2022 tea artist (intermediate) work license question bank and online simulation examination

ZUCC_编译语言原理与编译_实验04 语言与文法

2021-03-09 comp9021 class 7 Notes

ZUCC_ Principles of compiling language and compilation_ Experiment 04 language and grammar

LabVIEW finds prime numbers in an array of n elements

ZUCC_编译语言原理与编译_实验06 07 语法分析 LL 分析

一文详解|增长那些事儿
随机推荐
Tencent conference API - get rest API & webhook application docking information
ZUCC_编译语言原理与编译_实验05 正则表达式、有限自动机、词法分析
2021-06-25: a batch of strings consisting only of lowercase letters (a~z) are put
QTimer定时器不起作用的原因
Permission model DAC ACL RBAC ABAC
ZUCC_编译语言原理与编译_大作业
独立站运营中如何提升客户留存率?客户细分很重要!
A preliminary study of IO model
How to mount a USB hard disk with NTFS file format under RHEL5 system
ZUCC_编译语言原理与编译_实验01 语言分析与简介
QT writing security video monitoring system 36 onvif continuous movement
[explain the difference between operation and maintenance and network engineering]
Rust procedure macro simply imitates Lombok function
How to configure networkpolicy for nodeport in kubernetes
AUTO PWN
The reason why the qtimer timer does not work
ZUCC_编译语言原理与编译_实验06 07 语法分析 LL 分析
Vscode install the remote -wsl plug-in to connect to the local WSL
2021-03-11 comp9021 class 8 notes
Three categories of financial assets under the new standards: AMC, fvoci and FVTPL