您可以从influxdb中删除数据吗? [英] Can you delete data from influxdb?

查看:1579
本文介绍了您可以从influxdb中删除数据吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从influxdb中删除数据?

How do you delete data from influxdb?

文档显示它应该很简单:

The documentation shows it should be as simple as:

delete from foo where time < now() -1h

由于某种原因,influxdb拒绝了我的删除语句,说删除查询不能具有不引用时间的where子句"

For some reason, influxdb rejects my delete statements saying "Delete queries can't have where clause that doesn't reference time"

select * from bootstrap where duration > 1000 and time > 14041409940s and time < now()

我要删除这5个持续时间> 1000秒的条目

I want to delete these 5 entries whos duration > 1000 seconds

这应该是有效的sql语句,但失败

This should be a valid sql statement, yet it fails

这些删除语句都不起作用

None of these delete statements work either

delete from bootstrap where duration > 3000000"

delete from bootstrap where duration > 300000"

delete from bootstrap where time = 1404140994043"

delete from bootstrap where duration > 300000 and time > 1404141054508 "

delete from bootstrap where duration > 300000 and time > 1404141054508s "

delete from bootstrap where time > 1404141054508s and duration > 300000 "

delete from bootstrap where duration > 30000 and time > 1s"

文档参考

http://influxdb.com/docs/v0.8/api/query_language.html

更新

其他查询

delete from bootstrap where time > 1404141416824 and duration > 3000;
delete sequence_number from bootstrap where time > 1s and duration > 1000;

也许这是一个错误?

https://github.com/influxdb/influxdb/issues/975
https://github.com/influxdb/influxdb/issues/84

推荐答案

看来您可以在influxdb 0.9中做到这一点.例如,这对我来说是成功的查询:

It appears that you can do this in influxdb 0.9. For instance, here's a query that just succeeded for me:

DROP SERIES FROM temperature WHERE machine='zagbar'

(@ MuratCorlu的慷慨评论,我将先前的评论重新发布为答案...)

(Per generous comment by @MuratCorlu, I'm reposting my earlier comment as an answer...)

这篇关于您可以从influxdb中删除数据吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆