I see this question has been posted in many different ways but I have not found any meeting my case.
I simply need to remove/delete completely a measurement in a bucket.
My bucket is “Donald”
The measurement to remove/delete is “Duck”
The measurement shall be completely removed from the bucket.
I have not found any tool to do the above in the UI.
In influx 1.x I simply use
Influx
use Donald
DROP MEASUREMENT Duck
How can I delete the measurement from the UI or using the CLI in Influx 2.3.x?
Thank you for your reply.
Could you kindly elaborate on why a start/stop date is required if the measurement is being completely deleted?
Does your suggested query remove completely the “cpu” measurement or only the data within the specified start/stop date range?
As you can see, I have a measurement, test_data in testing/autogen bucket
from the command description, the start and stop should be optional, but when I tried to just type delete command without start and end, but it shows me an error
Error: Request flags “start, stop” not set
Therefore, I had to type start and stop flag
as you can see, there is no error when I add start and end flag
then, the test_data measurement can be deleted successfully
@Felice_Massaro Your influxd delete command didn’t work because you used curly quotes instead of straight quotes in the predicate and you didn’t close the outer single quote. You don’t need to include the start and stop flags. To fully remove a measurement, leave those out.
@Scott Your suggestion does not seem to work.
The command returns an error saying the “start” and “stop” flags are required.
Here is the error I am getting: [Error: Required flags “start, stop” not set]
Here is the command I typed: [influx delete --bucket rts --predicate ‘__measurement=“stat”’]
My influx CLI version: [Influx CLI 2.6.1 (git: 61c5b4d533) build_date: 2022-12-29T12:58:32Z]
@scott Thank you for that. I am actually surprised how the two underscores ended up there. I have taken a screen recording and I will share that soon. The command still requires you to specify the start and stop dates.
hi,
you probably solved this but all of you options didn’t work with me so i just want to add what worked for me
i took a screen shot because the editor here removes it