文档章节

dataX json配置

o
 osc_1ee7cxmx
发布于 2018/08/06 14:36
字数 304
阅读 12
收藏 0

精选30+云产品,助力企业轻松上云!>>>

1.mysql2mysql的例子

{
    "job":{
        "content":[
            {
                "reader":{
                    "name":"mysqlreader",
                    "parameter":{
                        "column":[
                            "id",
                            "name"
                        ],
                        "connection":[
                            {
                                "jdbcUrl":[
                                    "jdbc:mysql://127.0.0.1:3306/dq"
                                ],
                                "table":[
                                    "table1"
                                ]
                            }
                        ],
                        "password":"123456",
                        "username":"root"
                    }
                },
                "writer":{
                    "name":"mysqlwriter",
                    "parameter":{
                        "column":[
                            "id",
                            "name"
                        ],
                        "connection":[
                            {
                                "jdbcUrl":"jdbc:mysql://ip地址:端口/test",
                                "table":[
                                    "table2"
                                ]
                            }
                        ],
                        "password":"123456",
                        "username":"root"
                    }
                }
            }
        ],
        "setting":{
            "speed":{
                "channel":"1"
            }
        }
    }
}

 

2.mysql到本地:

{
    "job":{
        "content":[
            {
                "reader":{
                    "name":"mysqlreader",
                    "parameter":{
                        "username":"root",
                        "password":"root",
                        "column":[
                            "ID",
                            "VISIT_IP"
                        ],
                        "connection":[
                            {
                                "table":[
                                    "visit_log"
                                ],
                                "jdbcUrl":[
                                    "jdbc:mysql://192.168.0.197:3306/qyyx_test"
                                ]
                            }
                        ]
                    }
                },
                "writer":{
                    "name":"streamwriter",
                    "parameter":{
                        "print":false,
                        "encoding":"UTF-8"
                    }
                }
            }
        ]
    }
}

 

3.HDFS打印到本地控制台

{
    "job":{
        "setting":{
            "speed":{
                "channel":3
            }
        },
        "content":[
            {
                "reader":{
                    "name":"hdfsreader",
                    "parameter":{
                        "path":"/user/hive/warehouse/test.db/nnn/*",
                        "defaultFS":"hdfs://192.168.200.45:8020",
                        "column":[
                            "*"
                        ],
                        "fileType":"orc",
                        "encoding":"UTF-8",
                        "fieldDelimiter":","
                    }
                },
                "writer":{
                    "name":"streamwriter",
                    "parameter":{
                        "print":true
                    }
                }
            }
        ]
    }
}

4.orcle打印到Linux

{
    "job":{
        "setting":{
            "speed":{
                "channel":5
            }
        },
        "content":[
            {
                "reader":{
                    "name":"oraclereader",
                    "parameter":{
                        "username":"edw_src",
                        "password":"123456",
                        "where":"",
                        "connection":[
                            {
                                "querySql":[
                                    "select * from ORDER_DETAIL_BAK"
                                ],
                                "jdbcUrl":[
                                    "jdbc:oracle:thin:@192.168.0.197:1521:orcl"
                                ]
                            }
                        ]
                    }
                },
                "writer":{
                    "name":"streamwriter",
                    "parameter":{
                        "visible":true,
                        "encoding":"UTF-8"
                    }
                }
            }
        ]
    }
}

 

5.sqlserver to mysql

{
  "job": {
    "content": [
      {
        "reader": { //读入库配置,比如说是sql server "name": "", //数据源名称,别瞎写 "parameter": {} //数据库配置信息 }, "writer": { //写入库配置,比如说是mysql "name": "", //数据源名称,别瞎写 "parameter": {} //数据库配置信息 } } ], "setting": { //基本设置 "speed": { //流量控制 "channel": 1, //同步时候的并发数 "byte": 104857600 //同步时候的字节大小,影响速度 }, "errorLimit": { //脏数据控制 "record": 10, //脏数据最大记录数阈值 "percentage": 0.05 //脏数据占比阈值 } } } }
o
粉丝 0
博文 500
码字总数 0
作品 0
私信 提问
加载中
请先登录后再评论。

暂无文章

hbase2.1.9 centos7 完全分布式 搭建随记

hbase2.1.9 centos7 完全分布式 搭建随记 这里是当初在三个ECS节点上搭建hadoop+zookeeper+hbase+solr的主要步骤,文章内容未经过润色,请参考的同学搭配其他博客一同使用,并记得根据实际情...

osc_4tfw1dxv
38分钟前
11
0
zookeeper3.5.5 centos7 完全分布式 搭建随记

zookeeper3.5.5 centos7 完全分布式 搭建随记 这里是当初在三个ECS节点上搭建hadoop+zookeeper+hbase+solr的主要步骤,文章内容未经过润色,请参考的同学搭配其他博客一同使用,并记得根据实...

osc_6jhxf9ab
39分钟前
19
0
steam夏日促销悄然开始,用Python爬取排行榜上的游戏打折信息

前言 很多人学习python,不知道从何学起。 很多人学习python,掌握了基本语法过后,不知道在哪里寻找案例上手。 很多已经做案例的人,却不知道如何去学习更加高深的知识。 那么针对这三类人,...

osc_ur9mmbck
40分钟前
16
0
python 里 certifi 库的作用

python 里 certifi 库的作用 安装了certifi之后,和requests库一样也有一个cacert.pem,可以用编辑器打开cacert.pem,里面包含了很多可信任知名公司的证书/公钥 库的路径,我这里是python2.7...

osc_1x6ycmfm
41分钟前
11
0
干掉"ZooKeeper",阿里为什么不用ZK做服务发现?

  20大进阶架构专题每日送达   链接:yq.aliyun.com/articles/601745   2020年Java面试题库连载中   !   正文   站在未来的路口,回望历史的迷途,常常会很有意思,因为我们会不...

osc_q5m9dzk0
43分钟前
17
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部