TDengineReader 插件实现了 TDengine 读取数据的功能。
TDengineReader 通过 TDengine 的 JDBC driver 查询获取数据。
配置一个从 TDengine 抽取数据作业:
{
"job": {
"content": [
{
"reader": {
"name": "tdenginereader",
"parameter": {
"username": "root",
"password": "taosdata",
"connection": [
{
"table": [
"meters"
],
"jdbcUrl": [
"jdbc:TAOS-RS://192.168.56.105:6041/test?timestampFormat=TIMESTAMP"
]
}
],
"column": [
"ts",
"current",
"voltage",
"phase"
],
"where": "ts>=0",
"beginDateTime": "2017-07-14 10:40:00",
"endDateTime": "2017-08-14 10:40:00"
}
},
"writer": {
"name": "streamwriter",
"parameter": {
"encoding": "UTF-8",
"print": true
}
}
}
],
"setting": {
"speed": {
"channel": 1
}
}
}
}
配置一个自定义 SQL 的数据抽取作业:
{
"job": {
"content": [
{
"reader": {
"name": "tdenginereader",
"parameter": {
"user": "root",
"password": "taosdata",
"connection": [
{
"querySql": [
"select * from test.meters"
],
"jdbcUrl": [
"jdbc:TAOS-RS://192.168.56.105:6041/test?timestampFormat=TIMESTAMP"
]
}
]
}
},
"writer": {
"name": "streamwriter",
"parameter": {
"encoding": "UTF-8",
"print": true
}
}
}
],
"setting": {
"speed": {
"channel": 1
}
}
}
}
TDengine 数据类型 | DataX 内部类型 |
---|---|
TINYINT | Long |
SMALLINT | Long |
INTEGER | Long |
BIGINT | Long |
FLOAT | Double |
DOUBLE | Double |
BOOLEAN | Bool |
TIMESTAMP | Date |
BINARY | Bytes |
NCHAR | String |
-Xms1024m -Xmx1024m -XX:+HeapDumpOnOutOfMemoryError
通道数 | DataX速度(Rec/s) | DataX流量(MB/s) | DataX机器网卡流出流量(MB/s) | DataX机器运行负载 | DB网卡进入流量(MB/s) | DB运行负载 | DB TPS |
---|---|---|---|---|---|---|---|
1 | |||||||
4 | |||||||
8 | |||||||
16 | |||||||
32 |
说明:
1. 2.