insert into...
{
"job": {
"setting": {
"speed": {
"channel": 5
}
},
"content": [
{
"reader": {},
"writer": {
"name": "sqlserverwriter",
"parameter": {
"username": "root",
"password": "root",
"column": [
"db_id",
"db_type",
"db_ip",
"db_port",
"db_role",
"db_name",
"db_username",
"db_password",
"db_modify_time",
"db_modify_user",
"db_description",
"db_tddl_info"
],
"connection": [
{
"table": [
"db_info_for_writer"
],
"jdbcUrl": "jdbc:sqlserver://[HOST_NAME]:PORT;DatabaseName=[DATABASE_NAME]"
}
],
"preSql": [
"delete from @table where db_id = -1;"
],
"postSql": [
"update @table set db_modify_time = now() where db_id = 1;"
]
}
}
}
]
}
}
-Xms1024m -Xmx1024m -XX:+HeapDumpOnOutOfMemoryError
Q: SqlServerWriter执行postSql语句报错,那么数据导入到目标数据库了吗?
Q: 按照上述说法,那么有部分脏数据导入数据库,如果影响到线上数据库怎么办?
Q: 上面第二种方法可以避免对线上数据造成影响,那我具体怎样操作?
评论区(0)