有一点与NaN'值。如何从InfluxDB中删除它? 我试过这个问题:
+-------------+---------------+-------------+
| id | code | code2 |
+-------------+---------------+-------------+
| 10255911 |sample data |sample data |
| 10255912 |sample data |sample data |
| 10255913 |sample data |sample data |
+-------------+---------------+-------------+
但它不起作用; /
我明白了:
> select * from pressure where value is not null;
> select * from pressure where value is null;
ERR: error parsing query: found NOT, expected SELECT, DELETE, SHOW, CREATE, DROP, GRANT, REVOKE, ALTER, SET at line 1, char 39
> select * from pressure where value < 900;
> select * from pressure where value = 'NaN';
> select * from pressure where value = null;
> select * from pressure where value = -28;
> select * from pressure where value = "0";
> select * from pressure where value = '0';
> select * from pressure where value = 0;
然后:
> SELECT * FROM pressure WHERE time > '2016-01-01T01:00:00Z' AND time < '2016-01-01T04:00:00Z'
name: pressure
--------------
time database value
[...]
1451611512766000000 home 1003.4
1451611572834000000 home -28.4
答案 0 :(得分:1)
这看起来像InfluxDB 0.9。删除特定点没有好办法。这是允许所需性能的core assumptions之一。 NaN
也不是有效的数据类型,但不幸的是,有一些短暂的摄取路径没有清理NaN
个条目。
您最好的方法是使用有限选择来确定点,例如SELECT * FROM pressure WHERE time > '2016-01-01T02:00:00Z' AND time < '2016-01-01T03:00:00Z' GROUP BY *
。 NaN
点应该在返回的某个地方。
找到该点后,记录完整的标签集和时间戳。标记集将位于查询返回的分组中。然后,您可以使用完全相同的时间戳和标记集提交新点,但NaN
字段的值不同。这一新观点将无声地覆盖旧观点。