DataX 安装和使用
生活随笔
收集整理的這篇文章主要介紹了
DataX 安装和使用
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
阿里云介紹:
1. 下載安裝包。作為阿里主要的數(shù)據(jù)傳輸工具Datax,阿里已經(jīng)完全開源到github上面了。下載地址(https://github.com/alibaba/DataX)。
2. 安裝環(huán)境:
- 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
?
轉(zhuǎn)載于:https://www.cnblogs.com/Jesse-Li/p/9983137.html
總結(jié)
以上是生活随笔為你收集整理的DataX 安装和使用的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: mybatis简化实现思路
- 下一篇: K8s简单yaml文件运行例子deplo