DataX mysql 同步
脚本任务
{
"job": {
"setting": {
"speed": {
"channel": 1
}
},
"content": [
{
"reader": {
"name": "mysqlreader",
"parameter": {
"username": "root",
"password": "****",
"column": [
"*"
],
"splitPk": "id",
"connection": [
{
"table": [
"xxx"
],
"jdbcUrl": [
"jdbc:mysql://xxx:3306/xxx?useUnicode=true&characterEncoding=UTF-8&useSSL=false"
]
}
]
}
},
"writer": {
"name": "mysqlwriter",
"parameter": {
"writeMode": "insert",
"username": "zhenwu",
"password": "Fiber@123456",
"column": [
"*"
],
"session": [
"set session sql_mode='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'"
],
"preSql": [
"TRUNCATE XXX"
],
"connection": [
{
"jdbcUrl": "jdbc:mysql://XXX:3306/XXX?useUnicode=true&characterEncoding=UTF-8&useSSL=false",
"table": [
"XXX"
]
}
]
}
}
}
]
}
}
本文来自博客园,作者:vx_guanchaoguo0,转载请注明原文链接:https://www.cnblogs.com/guanchaoguo/p/17958324