mirror of
https://github.com/thingsboard/thingsboard-gateway
synced 2025-10-26 22:31:42 +08:00
58 lines
1.2 KiB
JSON
58 lines
1.2 KiB
JSON
{
|
|
"connection": {
|
|
"str": "Driver={PostgreSQL};Server=localhost;Port=5432;Database=thingsboard;Uid=postgres;Pwd=postgres;",
|
|
"attributes": {
|
|
"autocommit": true,
|
|
"timeout": 0
|
|
},
|
|
"encoding": "utf-8",
|
|
"decoding": {
|
|
"char": "utf-8",
|
|
"wchar": "utf-8",
|
|
"metadata": "utf-16le"
|
|
},
|
|
"reconnect": true,
|
|
"reconnectPeriod": 60
|
|
},
|
|
"pyodbc": {
|
|
"pooling": false
|
|
},
|
|
"polling": {
|
|
"query": "SELECT * FROM tb_user WHERE created_time > ? ORDER BY created_time ASC LIMIT 10",
|
|
"period": 10,
|
|
"iterator": {
|
|
"column": "created_time",
|
|
"query": "SELECT MIN(created_time) - 1 FROM tb_user",
|
|
"persistent": false
|
|
}
|
|
},
|
|
"mapping": {
|
|
"device": {
|
|
"type": "postgres",
|
|
"name": "'ODBC ' + email"
|
|
},
|
|
"sendDataOnlyOnChange": false,
|
|
"attributes": "*",
|
|
"timeseries": [
|
|
{
|
|
"name": "value",
|
|
"value": "[i for i in additional_info if i is not None][0]"
|
|
}
|
|
]
|
|
},
|
|
"serverSideRpc": {
|
|
"enableUnknownRpc": false,
|
|
"overrideRpcConfig": true,
|
|
"methods": [
|
|
"procedureOne",
|
|
{
|
|
"name": "procedureTwo",
|
|
"args": [
|
|
"One",
|
|
2,
|
|
3.0
|
|
]
|
|
}
|
|
]
|
|
}
|
|
} |