Closed masterchengsheng closed 4 months ago
String sql = "select ts,`value`,order_num,frequency from dqms.measure_vibrate_original where ts>= 1713518404000 and ts <= 1713518406000 and equipment_code='Y1CRF001PO' and measure_code='MBND_1_P_800L_1K' order by ts";
HikariDataSource dataSource = new HikariDataSource();
dataSource.setPassword("taosdata");
dataSource.setUsername("root");
dataSource.setJdbcUrl("jdbc:TAOS-RS://192.168.135.52:6041/dqms?user=root&password=taosdata");
dataSource.setMaximumPoolSize(10);
dataSource.setDriverClassName("com.taosdata.jdbc.rs.RestfulDriver");
try (Connection connection = dataSource.getConnection()) {
ResultSet resultSet = connection.createStatement().executeQuery(sql);
while (resultSet.next()) {
String string = resultSet.getString("value");
System.out.println(StringUtils.isBlank(string) ? "----" : string);
}
}
返回来的数据
可以加微信具体沟通一下a15652223354
升级jdbc 版本->3.2.9 td版本3.2.3 之后不会出现上述问题
在执行超级查询数据时,发现采用数据源查询数据,数据字段长的那个字段会出现有的时候查询出来,有的时候查询不出来,数据出现是随机的,
数据超级表结构:
CREATE STABLE
measure_vibrate_original(
tsTIMESTAMP,
valueVARCHAR(65500),
frequencyINT) TAGS (
measure_codeVARCHAR(64),
equipment_codeVARCHAR(64),
measure_type_codeVARCHAR(64),
company_codeVARCHAR(64),
order_numINT)
查询语句:
select ts,
value,order_num,frequency from dqms.measure_vibrate_original where ts>= 1713518404000 and ts <= 1713518406000 and equipment_code='Y1CRF001PO' and measure_code='MBND_1_P_800L_1K' order by ts
直接在taos命令行中已经确认有七条数据,每条数据的value都有数据。但是采用数据源执行查询时,返回的数据在value这个字段中随机的出现
驱动版本3.2.4; td的版本3.2.0 springboot 版本2.5.14 这是采用数据源直接测试的代码