当前位置:网站首页>【无标题】
【无标题】
2022-06-30 10:36:00 【feifeidata】
mysqlreader部分配置参数说明
column:需要同步的列名集合,使用JSON数组描述自带信息,*代表所有列
jdbcUrl:对数据库的JDBC连接信息,使用JSON数组描述,支持多个连接地址
table:需要同步的表,支持多个
querySql:自定义SQL,配置该属性会直接忽略table、column、where
password:密码
username:用户名
where(可选):筛选条件
splitPK(可选):数据分片字段,一般为主键
writer配置如下
column:写入的字段,其中name指定字段名,type指定类型
compress(可选):压缩文件类型,不写即没有压缩
defaultFS:hdfs文件系统namenode节点地址,格式:hdfs://ip:端口
fieldDelimiter:字段分隔符
fileName:写入文件名
fileType:文件的类型,只支持text或orc
path:存储到Hadoop hdfs文件系统的路径信息
writeMode: 写入数据处理模式
包括:append(追加)、nonConflict(新增)
编辑配置文件
[[email protected] datax]# vi job/mysql2hdfs.json
添加如下配置
{
“job”: {
“content”: [
{
“reader”: {
“name”: “mysqlreader”,
“parameter”: {
“column”: [
“sensor”,
“temp”
],
“connection”: [
{
“jdbcUrl”: [
“jdbc:mysql://192.168.56.20:3306/mytest”
],
“table”: [
“temperatures”
]
}
],
“password”: “1234”,
“username”: “root”,
}
},
“writer”: {
“name”: “hdfswriter”,
“parameter”: {
“column”: [
{
“name”:“sensor”,
“type”:“string”
},
{
“name”:“temp”,
“type”:“double”
}
],
“defaultFS”: “hdfs://192.168.56.20:9000”,
“fieldDelimiter”: “\t”,
“fileName”: “temperatures”,
“fileType”: “text”,
“path”: “/mydataxInfo/”,
“writeMode”: “append”
}
}
}
],
“setting”: {
“speed”: {
“channel”: “1”
}
}
}
}
[[email protected] datax]# bin/datax.py job/mysql2hdfs.json
1
使用的fileName可能会自动字hdfs生成各种后缀,我们直接以通配符‘*’来查看
边栏推荐
- Viewing technological changes through Huawei Corps (V): smart Park
- Review of mathematical knowledge: curve integral of the second type
- CP2112使用USB转IIC通信教学示例
- 在 sCrypt 中实现高效的椭圆曲线点加法和乘法
- Pytorch notes torch nn. BatchNorm1d
- ArrayList and sequence table
- 无心剑中译狄金森《灵魂择其伴侣》
- Wireguard simple configuration
- The reasoning delay on iphone12 is only 1.6 MS! Snap et al. Analyzed the transformer structure latency in detail, and used NAS to find out the efficient network structure of mobile devices
- Time complexity and space complexity
猜你喜欢

The reasoning delay on iphone12 is only 1.6 MS! Snap et al. Analyzed the transformer structure latency in detail, and used NAS to find out the efficient network structure of mobile devices

语音识别-基础(一):简介【语音转文本】

20万奖金池!【阿里安全 × ICDM 2022】大规模电商图上的风险商品检测赛火热报名中!...

DQN笔记

matplotlib 笔记: contourf & contour

7 大轻量易用的工具,给开发者减压提效,助力企业敏捷上云 | Techo Day 精彩回顾...

CP2112使用USB转IIC通信教学示例

煥發青春的戴爾和蘋果夾擊,兩大老牌PC企業極速衰敗

吴恩达2022机器学习专项课测评来了!

中国将强制统一充电接口,苹果如不低头,iPhone将被踢出中国市场
随机推荐
Sarsa笔记
CSDN blog operation team 2022 H1 summary
LED driver library based on Hal Library
Matplotlib notes: contour & Contour
国产自研系统的用户突破4亿,打破美国企业的垄断,谷歌后悔不迭
再测云原生数据库性能:PolarDB依旧最强,TDSQL-C、GaussDB变化不大
China will force a unified charging interface. If Apple does not bow its head, iPhone will be kicked out of the Chinese market
Deep dive kotlin synergy (16): Channel
软件测试工程师面试基础题(应届生和测试小菜必备)最基础的面试题
LVGL 8.2 Image styling and offset
Retest the cloud native database performance: polardb is still the strongest, while tdsql-c and gaussdb have little change
微信推出图片大爆炸功能;苹果自研 5G 芯片或已失败;微软解决导致 Edge 停止响应的 bug|极客头条...
& and - > priority
Mysql database foundation: views and variables
科普达人丨漫画图解什么是eRDMA?
The life, working principle and application of electrochemical oxygen sensor
LVGL 8.2 re-coloring
Cp2112 teaching example of using USB to IIC communication
SQL必需掌握的100个重要知识点:创建和操纵表
腾讯云数据库工程师能力认证重磅推出,各界共话人才培养难题