
使用datax从oracle 12.2.0.1迁移到mysql 8.0
表的字段是select ID_,CREATE_TIME_ from statudent;
job内容如下:
{
"job": {
"setting": {
"speed": {
"channel": 5
}
},
"content": [
{
"reader": {
"name": "oraclereader",
"parameter": {
"username": "student",
"password": "student",
"where": "",
"mandatoryEncoding": "UTF8",
"connection": [
{
"querySql": [
" select ID_,CREATE_TIME_ from statudent;"
],
"jdbcUrl": [
"jdbc:oracle:thin:@10.10.10.11:1521/student"
]
}
]
}
},
"writer": {
"name": "mysqlwriter",
"parameter": {
"column": ["ID_","CREATE_TIME_",],
"connection": [
{
"jdbcUrl": "jdbc:mysql://10.10.10.10:3306/oa?useUnicode=true&characterEncoding=utf8",
"table": ["statudent"]
}
],
"password": "student",
"username": "student",
"preSql": ["truncate table statudent"],
"segment_reject_limit": 0,
"copy_queue_size": 100000,
"num_copy_processor": 4,
"num_copy_writer": 1
}
}
}
]
}
}
源oracle得内容如下:
导入mysql之后如下:
其他表的字段是正常字符结尾的,导入的数据都是正常的,只有字段结尾使用了下划线,导入的数据是这样,有什么方法可以解决