DataX-Oracle新增writeMode支持update
{
"job": {
"setting": {
"speed": {
"channel": 1
}
},
"content": [
{
"reader": {
"name": "oraclereader",
"parameter": {
"username": "your_username",
"password": "your_password",
"column": ["id", "name", "age"],
"splitPk": "id",
"connection": [
{
"querySql": [
"select id, name, age from your_table where ..."
],
"jdbcUrl": [
"jdbc:oracle:thin:@//host:port/SID"
]
}
]
}
},
"writer": {
"name": "oraclewriter",
"parameter": {
"username": "your_username",
"password": "your_password",
"writeMode": "update", // 使用update模式
"session": ["set autocommit=true"], // 启用自动提交
"preSql": ["truncate table your_target_table"], // 可选:在写入前清空目标表
"connection": [
{
"jdbcUrl": "jdbc:oracle:thin:@//host:port/SID",
"table": ["your_target_table"]
}
],
"column": [
{
"name": "id",
"type": "int"
},
{
"name": "name",
"type": "string"
},
{
"name": "age",
"type": "int"
}
]
}
}
}
]
}
}
这个JSON配置文件定义了一个DataX作业,它从一个Oracle数据源读取数据,并使用oraclewriter
插件以update
模式将数据写入到目标Oracle数据表中。在写入前,它会清空目标表(这
评论已关闭