datax 开启字段血缘
时间: 2023-08-23 07:08:23 浏览: 144
在 datax 中开启字段血缘功能,需要在 Job 配置文件中添加如下配置:
```json
{
"job": {
"setting": {
"speed": {
"channel": 3
},
"errorLimit": {
"record": 0,
"percentage": 0.02
},
"dirtyDataPath": "/tmp/datax/dirtyfile",
"fieldLineage": true // 开启字段血缘功能
},
"content": [
{
"reader": {
"name": "mysqlreader",
"parameter": {
"username": "root",
"password": "123456",
"column": ["id","name","age","gender"],
"connection": [
{
"table": [
"test"
],
"jdbcUrl": [
"jdbc:mysql://localhost:3306/test?characterEncoding=utf8&useSSL=false"
]
}
]
}
},
"writer": {
"name": "mysqlwriter",
"parameter": {
"writeMode": "insert",
"username": "root",
"password": "123456",
"column": ["id","name","age","gender"],
"connection": [
{
"jdbcUrl": "jdbc:mysql://localhost:3306/test?characterEncoding=utf8&useSSL=false",
"table": ["test_copy"]
}
]
}
}
}
]
}
}
```
在上面的配置中,我们将 `"fieldLineage": true` 添加到了 `job.setting` 中。这样就开启了字段血缘功能。
阅读全文