influxdata / influxdata/influxdb
Influx 2.0: Delete predicate whole measurement
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
Hello!
__Proposal:__
It will be great, if Delete predicate can remove whole measurement, not only content of measurement.
__Current behavior:__
Now i can delete whole data from measurement, but can not delete measurement it self.
My command is:
influx delete --bucket Bucket_Name --org My_Org --start '1970-01-01T00:00:00Z' --stop $(date +"%Y-%m-%dT%H:%M:%SZ") --predicate '_measurement="metrics"'
This will delete all data in "metrics", but "metrics" will remains.
__Desired behavior:__
By such command measurement must be deleted. You can insert interactive "Yes/No" asking in this. Looks like that:
influx delete --bucket Bucket_Name --org My_Org --start '1970-01-01T00:00:00Z' --stop $(date +"%Y-%m-%dT%H:%M:%SZ") --predicate '_measurement="metrics"'
Are You sure to delete whole measurement "metrics"?
Type Yes/No:
Yes
Measurement "metrics" is deleted.
__Use case:__
First: wrong measurements are made. Often with data parsers, when parser is making mistake.
Second: when you do not need this measurement any more. For example - temporary measurement.
Third: if you want to clear data in bucket, but you do not want to recreate bucket it self (it is in any tokens or auth rules).
Contributor guide
Research direction
Start with the `influx delete` command and how its `_measurement` predicate is handled. Compare the current behavior described in the issue with the requested confirmation and whole-measurement deletion behavior; done means the command safely removes the measurement as specified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100