oracle数据同步开源,阿里开源数据同步工具--DataX

阿里开源数据同步工具--DataX

是啥?:

是异构数据源离线同步工具

能干啥?:

能够将MySQL sqlServer Oracle Hive HBase  FTP 之间进行稳定高效的数据同步。

设计思路:

网状连接-》 星型连接

看图:

0818b9ca8b590ca3270a3433284dd417.png

目前支持哪些数据同步?:

0818b9ca8b590ca3270a3433284dd417.png

核心架构:

0818b9ca8b590ca3270a3433284dd417.png

推荐使用python 2.6 7 不要使用python 3,0

使用方法和案例:

1. 准备一个job.json  或者job.xml

执行命令:

python datax.py job.json

1: oracle 到本地文件

{

"job": {

"content": [

{

"reader": {

"name": "oraclereader",

"parameter": {

"username": "xxxxx",

"password": "xxxxxx",

"where": "",

"connection": [

{

"querySql": [

"select * from table1"

],

"jdbcUrl": [

"jdbc:oracle:thin:@192.168.121.30:1521:tcenter"

]

}

]

}

},

"writer": {

"name": "txtfilewriter",

"parameter": {

"path": "D:/data/",

"fileName": "oracledata",

"writeMode": "truncate",

"format": "yyyy-MM-dd"

}

}

}

],

"setting": {

"speed": {

"channel": 1

}

}

}

}

2.oracle ->oracle

{

"job": {

"content": [

{

"reader": {

"name": "oraclereader",

"parameter": {

"username": "xxxx",

"password": "xxxx",

"column": ["*"],

"where": "",

"connection": [

{

"querySql": [

"select * from table1"

],

"jdbcUrl": [

"jdbc:oracle:thin:@192.168.121.30:1521:tcenter"

]

}

]

}

},

"writer": {

"name": "oraclewriter",

"parameter": {

"username": "xxxx",

"password": "xxxx",

"truncate": "true",

"column": ["SYSTEMNO",

"SYSTEMTIME",

"xxx",

"x",

"x",

"x",

"x",

"x",

"x",

"x",

"x",

"x",

"STATUS",

"x",

"x",

"x"

],

"connection": [

{

"jdbcUrl": "jdbc:oracle:thin:@192.168.121.30:1521:tcexxnter",

"table": [

"table1"

]

}

]

}

}

}

],

"setting": {

"speed": {

"channel": 6

}

}

}

}

你可能感兴趣的:(oracle数据同步开源)