Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug]datax把mysql数据迁移到ob,使用"preSql": ["truncate table XXX"],无数据 #2258

Open
Flutemr opened this issue Dec 19, 2024 · 1 comment

Comments

@Flutemr
Copy link

Flutemr commented Dec 19, 2024

{
"job": {
"setting": {
"speed": {
"channel": 4
},
"errorLimit": {
"record": 0,
"percentage": 0.1
}
},
"content": [
{
"reader": {
"name": "mysqlreader",
"parameter": {
"username": "root",
"password": "XXXXX",
"column": [
""
],
"where": "dt='${bizdate}'",
"connection": [
{
"table": ["XXXXX"],
"jdbcUrl": ["jdbc:mysql://XXXX:3306/za_ods?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai"]
}
]
}
},
"writer": {
"name": "oceanbasev10writer",
"parameter": {
"obWriteMode": "insert",
"column": [
"
"
],
"preSql": ["truncate table XXXXX"],
"connection": [
{
"jdbcUrl": "||dsc_ob10_dsc||obyyt:nldz||dsc_ob10_dsc||jdbc:oceanbase://XXXX:2883/dgped_bus_zaxq?useLocalSessionState=true&allowBatch=true&allowMultiQueries=true&rewriteBatchedStatements=true",
"table": ["XXXX"]
}
],
"username": "root",
"password": "XXXX",
"writerThreadCount": 10,
"batchSize": 1000,
"memstoreThreshold": "0.9"
}
}
}
]
}
}

加上"preSql": ["truncate table XXXXX"], 后,发现任务能运行成功,但是表里没有数据。去掉这个后,没问题。

@Flutemr
Copy link
Author

Flutemr commented Dec 19, 2024

oceabase的是4.2.5版本。有人遇到过这个情况吗,truncate table 和delete from 都不行

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant