1{ 2 "connection": { 3 "str": "Driver={PostgreSQL};Server=localhost;Port=5432;Database=thingsboard;Uid=postgres;Pwd=postgres;", 4 "attributes": { 5 "autocommit": true, 6 "timeout": 0 7 }, 8 "encoding": "utf-8", 9 "decoding": { 10 "char": "utf-8", 11 "wchar": "utf-8", 12 "metadata": "utf-16le" 13 }, 14 "reconnect": true, 15 "reconnectPeriod": 60 16 }, 17 "pyodbc": { 18 "pooling": false 19 }, 20 "polling": { 21 "query": "SELECT bool_v, str_v, dbl_v, long_v, entity_id, ts FROM ts_kv WHERE ts > ? ORDER BY ts ASC LIMIT 10", 22 "period": 10, 23 "iterator": { 24 "column": "ts", 25 "query": "SELECT MIN(ts) - 1 FROM ts_kv", 26 "persistent": false 27 } 28 }, 29 "mapping": { 30 "device": { 31 "type": "postgres", 32 "name": "'ODBC ' + entity_id" 33 }, 34 "sendDataOnlyOnChange": false, 35 "attributes": "*", 36 "timeseries": [ 37 { 38 "name": "value", 39 "value": "[i for i in [str_v, long_v, dbl_v,bool_v] if i is not None][0]" 40 } 41 ] 42 }, 43 "serverSideRpc": { 44 "enableUnknownRpc": false, 45 "overrideRpcConfig": true, 46 "methods": [ 47 "procedureOne", 48 { 49 "name": "procedureTwo", 50 "args": [ "One", 2, 3.0 ] 51 } 52 ] 53 } 54 }