DROP MEASUREMENT for InfluxDB 2.x?

I’ve searched high and low, and I cannot find anything in InfluxDB 2.x that is equivalent to InfluxDB 1.x DROP MEASUREMENT. I realise I can drop buckets, but that seems like a fairly coarse approach if you simply want to drop a measurement (e.g. which may have been mistakenly created).

Is this functionality deliberately omitted, or has it just not landed yet?

1 Like

Hello @dswarbrick,
I image it will be added again. You could also create an issue to help prioritize it.

EDIT:
No - However a “predicate delete” is being added to the API that will allow delete based on a tagset filter. … so different implementation but same functionality

Thanks for your reply. It’s good to know that this functionality is still planned to be included. It sounds like it will be more analogous to “DROP SERIES … WHERE …”, than “DROP MEASUREMENT”. Would that be a fair assumption?

We’ve always been told that deleting data from time series DBs is bad, and we should instead just wait for it to age out by retention policy. Will these recommendations still apply to InfluxDB 2.x? There are likely to still be some occasions where data was inserted erroneously, and waiting for it to age out is not an option, especially if the bucket retention policy is long.

Hello @dswarbrick,
Once delete is added to the API, it would be possible to run a delete from Flux by calling out to the API. http.Post