influxdb icon indicating copy to clipboard operation
influxdb copied to clipboard

Wire up delete series

Open corylanou opened this issue 11 years ago • 42 comments

This is different than drop series. Drop series can take a set of tags, or an ID.

Delete series can additionally take a time range.

corylanou avatar Feb 19 '15 18:02 corylanou

@corylanou -- I think this is done, right?

otoolep avatar Mar 27 '15 23:03 otoolep

@otoolep No, DROP SERIES is complete, but not DELETE SERIES. They difference, from what I understand, is that delete will remove data from a series, but not actually drop the meta data, even if the delete empties the entire series. Delete can also remove a partial set of points from a series, where as drop always completely drops the series.

corylanou avatar Mar 28 '15 03:03 corylanou

That's right, with DELETE you can specify WHERE clause filters on either field values or the time range. So you can remove just part of a series.

pauldix avatar Mar 28 '15 20:03 pauldix

Any update on this? I'm on 0.9.2.1 and don't see delete functionality.

bobfeldbauer avatar Aug 02 '15 17:08 bobfeldbauer

This is not currently scheduled for any particular release. I would estimate late this year for this particular functionality unless the community votes it up.

beckettsean avatar Aug 03 '15 18:08 beckettsean

To be clear, the docs about the query language (https://influxdb.com/docs/v0.9/query_language/spec.html) that list the delete_stmt and have an example: DELETE FROM cpu WHERE region = 'uswest' just isn't wired up, and doesn't work?

cschneid avatar Aug 03 '15 20:08 cschneid

Thanks for the note, @cschneid. I made https://github.com/influxdb/influxdb.com/issues/191 to address the docs issue.

beckettsean avatar Aug 03 '15 22:08 beckettsean

+1

ghost avatar Sep 09 '15 11:09 ghost

+1

AlexeyDmitriev avatar Sep 14 '15 12:09 AlexeyDmitriev

+1

yujinqiu avatar Sep 15 '15 11:09 yujinqiu

+1

Need to be able to do stuff like:

DELETE FROM measurement WHERE tagKey = 'tagValue' DELETE FROM measurement WHERE valueKey >= value DELETE FROM measurement WHERE time < now() - 30d

cnelissen avatar Sep 23 '15 18:09 cnelissen

+1

alexanderdavidsen avatar Oct 09 '15 12:10 alexanderdavidsen

+1

Samuel1989 avatar Oct 15 '15 15:10 Samuel1989

+1 Deleting data points is essential for any database

Should be able to do DELETE FROM measurement WHERE time < now() - 30d like we could in influxdb 0.7

comcomservices avatar Oct 23 '15 20:10 comcomservices

@comcomservices for that use case perhaps retention policies cover what you need.

beckettsean avatar Oct 23 '15 20:10 beckettsean

@beckettsean We certainly use them but allot of times we need to remove bad data points from a data set as our clients or often OCD about these types of abnormalities, right now we add annotations to our graphs to explain these events but still deleting points like we had in 0.7 would be much better, right now we are working on a script to export everything, delete the series and then re-import only the data we want but feel that this is very far from ideal

Jon

P.S. Like this graph below where the voltage is all off skew, it would be nice to just have no data during this period because now this abnormality will stain all of our data and mis scales our graphs

need_to_delete_bad_points

comcomservices avatar Oct 23 '15 20:10 comcomservices

Thanks for the details, @comcomservices. Another workaround is to overwrite bad points with an orthogonal field set. Since you're using Grafana I'll assume most of your points have a single field named value. If you find a bad point or series of bad points, you can overwrite them with a different field set that doesn't include value.

Let's say this is the bad point: my_measurement,tag=foo,anothertag=bar value=12 1234567890. You could write this point to the database: my_measurement,tag=foo,anothertag=bar ignore=True 1234567890 and it will silently overwrite the prior point. (The measurement, tag set, and timestamp are identical, and InfluxDB overwrites points, it does not store duplicates.)

Queries for SELECT value... or SELECT MEAN(value)... or SELECT COUNT(value)... will all ignore that point now, because it has no field named value, just a boolean field named ignore. SELECT *... queries would still return the point, but since * cannot be used inside of functions, that shouldn't affect most graph-able queries.

beckettsean avatar Oct 23 '15 21:10 beckettsean

+1

alexiri avatar Nov 04 '15 13:11 alexiri

+1 on this and also #4404 for reporting an error until this is implemented.

samhatchett avatar Nov 18 '15 02:11 samhatchett

+1

discoduck2x avatar Dec 01 '15 09:12 discoduck2x