datax的querySql用法
解决方法:
{
"job": {
"setting": {
"speed": {
"byte": 1048576
}
},
"content": [
{
"reader": {
"name": "sqlserverreader",
"parameter": {
"username": "username",
"password": "password",
"connection": [
{
"querySql": ["select newid() as id,oucode from GunStatis where WorkDay>=dateadd(dd,-1,cast(getdate() as date))"],
"jdbcUrl": ["jdbc:sqlserver://12.191.2.22:1233;database=cldb"]
}
]
}
},
"writer": {
"parameter": {
"batch-size": 2048,
"column": [
{
"name": "id",
"index": 0,
"type": "string"
},{
"index": 1,
"name": "oucode",
"type": "string"
}],
"mutationBufferSpace": 5000,
"isUpsert": true,
"table": "impala::stat.GunStatis",
"masterAddr": "11.222.222.125:7221,10.228.222.126:7221,10.222.222.102:7221",
"primaryKey": [{
"index": 0,
"name": "id",
"type": "string"
}]
},
"name": "kuduwriter"
}
}
]
}
}