首页 > DataX 安装和使用

DataX 安装和使用

阿里云介绍:

1. 下载安装包。作为阿里主要的数据传输工具Datax,阿里已经完全开源到github上面了。下载地址(https://github.com/alibaba/DataX)。

2. 安装环境:

  • JDK(1.6以上,推荐1.6)
  • Python(推荐Python2.6.X)
  • Apache Maven 3.x (Compile DataX)

3. 解压到工作目录。/usr/local/datax

4. 编写源和目标表的json文件

{"job": {"setting": {"speed": {"channel": 3},"errorLimit": {"record": 0,"percentage": 0.02}},"content": [{"reader": {"name": "mysqlreader","parameter": {"writeMode": "insert","username": "root","password": "******","column": ["rec_id","column","etl_time"],"connection": [{"table": ["source_table"],"jdbcUrl": ["jdbc:mysql://11.278.80.200:34001/DW"]}]}},"writer": {"name": "mysqlwriter","parameter": {"username": "root","password": "*****","column": ["rec_id","column","etl_time"],"connection": [{"jdbcUrl": "jdbc:mysql://10.208.83.202:30001/DW","table": ["target_table"]}],              }}}],"setting": {"speed": {"channel": 1},"errorLimit": {         "record": 10}}}
}

5. 运行脚本

python /home/admin/datax3/bin/datax.py ./json/table_1.json

 

转载于:https://www.cnblogs.com/Jesse-Li/p/9983137.html

更多相关:

  • Spec: TS36.211 - Table 5.7.1-2...

  • xmlns xml namespaces 参考 http://www.w3school.com.cn/tags/tag_prop_xmlns.asp http://www.w3school.com.cn/xml/xml_namespaces.asp

    这是一行
  • 1.创建数据库:create database database-name 2.删除数据库:delete database database-name 3.选择:select * from table where ... 4.插入:insert into table(field1,field2) values(value1,value...

  • python 之路,Day11 - sqlalchemy ORM   本节内容 ORM介绍sqlalchemy安装sqlalchemy基本使用多外键关联多对多关系表结构设计作业  1. ORM介绍 orm英文全称object relational mapping,就是对象映射关系程序,简单来说我们类似python这种面向...