当前位置:网站首页>【无标题】
【无标题】
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生成各种后缀,我们直接以通配符‘*’来查看
边栏推荐
- The life, working principle and application of electrochemical oxygen sensor
- [STL source code analysis] container (to be supplemented)
- 煥發青春的戴爾和蘋果夾擊,兩大老牌PC企業極速衰敗
- [STL source code analysis] iterator
- 在IPhone12的推理延迟仅为1.6 ms!Snap等详析Transformer结构延迟,并用NAS搜出移动设备的高效网络结构...
- Ant financial's written test question: what can be quantified in the requirements document? [Hangzhou multi tester] [Hangzhou multi tester \wang Sir]
- 电化学氧气传感器寿命、工作原理及应用介绍
- 经典面试题:负责的模块,针对这些功能点你是怎么设计测试用例的?【杭州多测师】【杭州多测师_王sir】...
- LVGL 8.2 Simple Image button
- What is erdma as illustrated by Coptic cartoon?
猜你喜欢

【STL源码剖析】迭代器

IDEA 又出新神器,一套代码适应多端!

DQN笔记

微信推出图片大爆炸功能;苹果自研 5G 芯片或已失败;微软解决导致 Edge 停止响应的 bug|极客头条...
![[机缘参悟-34]:光锥之内皆命运](/img/3e/9f5630ba382df7f7ce00705445cef8.jpg)
[机缘参悟-34]:光锥之内皆命运

The number of users of the home-made self-developed system exceeded 400million, breaking the monopoly of American enterprises, and Google repented

Cp2112 teaching example of using USB to IIC communication

苹果高管公然“开怼”:三星抄袭 iPhone,只加了个大屏
![200000 bonus pool! [Alibaba security × ICDM 2022] the risk commodity inspection competition on the large-scale e-commerce map is in hot registration](/img/0e/19c4c97a582d7b2ad08ce806d7af03.jpg)
200000 bonus pool! [Alibaba security × ICDM 2022] the risk commodity inspection competition on the large-scale e-commerce map is in hot registration

无心剑中译狄金森《灵魂择其伴侣》
随机推荐
中国将强制统一充电接口,苹果如不低头,iPhone将被踢出中国市场
LVGL 8.2图片缩放及旋转
[rust daily] several new libraries were released on January 23, 2021
国产自研系统的用户突破4亿,打破美国企业的垄断,谷歌后悔不迭
LVGL8.2 Simple Checkboxes
Qt之实现动效导航栏
LVGL8.2 Simple Checkboxes
The number of users of the home-made self-developed system exceeded 400million, breaking the monopoly of American enterprises, and Google repented
LVGL 8.2 Image
电化学氧气传感器寿命、工作原理及应用介绍
My in-depth remote office experience | community essay solicitation
19:00 p.m. tonight, knowledge empowerment phase 2 live broadcast - control panel interface design of openharmony smart home project
LVGL 8.2 Simple Image button
蚂蚁金服笔试题:需求文档有什么可以量化的【杭州多测师】【杭州多测师_王sir】...
LVGL 8.2 re-coloring
[STL source code analysis] iterator
pytorch 笔记:validation ,model.eval V.S torch.no_grad
腾讯云数据库工程师能力认证重磅推出,各界共话人才培养难题
Google 辟谣放弃 TensorFlow,它还活着!
焕发青春的戴尔和苹果夹击,两大老牌PC企业极速衰败