解压gz包
运行解压命令,我这里解压到home目录 tar -zxvf ./datax.tar.gz
linux解压以后目录有 bin conf job lib log log_perf plugin script tmp
参考我自己配置的job.json( 注意参考使用的时候,去除注释) {
"job": {
"setting": {
"speed": {
"channel": 15,
"record":-1,
"byte":-1,
"batchSize":2048
}
},
"content": [
{
"reader": {
"name": "oraclereader",
"parameter": {
"username": "xxxx",
"password": "xxxx",
"column": ["*"],
"where":"",
"connection": [
{
"jdbcUrl": ["jdbc:oracle:thin:@ip:1521:SID"],
"table": ["T_PLT_VEHICLE_LOCATION"]
}
]
}
},
"writer": {
"name": "mysqlwriter",
"parameter": {
"writeMode": "insert",
"username": "xxxx",
"password": "xxxx",
"column": ["*"],
"connection": [
{
"jdbcUrl": "jdbc:mysql://ip:3306/库名?useUnicode=true&characterEncoding=utf-8",
"table": [
"t_plt_vehicle_location"
]
}
]
}
}
}
]
}
}