无法从Influx数据库中删除数据

时间:2019-11-25 14:56:06

标签: spring-boot influxdb

我正在尝试使用Java客户端从inflxux Db中删除数据,我的代码如下:

InfluxDB connection = dbConnection.getConnection();
final String query = "delete FROM measure where name='"abc"'";
QueryResult queryResult = connection.query(new Query(query, dbProperties.getDatabase()));
connection.write(dbProperties.getDatabase() + "_" + tenantId);

给我一​​个例外:

org.influxdb.InfluxDBException: database is required
at org.influxdb.InfluxDBException.buildExceptionFromErrorMessage(InfluxDBException.java:161)
at org.influxdb.InfluxDBException.buildExceptionForErrorState(InfluxDBException.java:173)
at org.influxdb.impl.InfluxDBImpl.execute(InfluxDBImpl.java:808)
at org.influxdb.impl.InfluxDBImpl.write(InfluxDBImpl.java:483)
at org.influxdb.impl.InfluxDBImpl.write(InfluxDBImpl.java:494)
at org.influxdb.impl.InfluxDBImpl.write(InfluxDBImpl.java:417)

请告诉我我在做什么错了。

0 个答案:

没有答案