I work on a project where I have multiple measuring devices (with various types of sensors on one measuring device) in multiple locations.
I am using influxDB v2.1 and I desing my bucket where I am writing data into _measurements.
Location(tag)| Device(tag)| _field | -------------|------------|-------------| location A | device1 |device1_temp | location B | device2 |device1_press| ...
So now If I want to delete device1_temp from _field this is no longer available in version 2. So this Query will not work
influx delete --bucket db --start 2022-05-04T00:00:00Z --stop 2022-05-06T00:00:00Z --predicate '_measurement="sensors" AND _field="device1_temp"'
Instead of this query I have to delete data by tag
influx delete --bucket db --start 2022-05-04T00:00:00Z --stop 2022-05-06T00:00:00Z --predicate '_measurement="sensors" AND device="device1"'
BUT this will delete all measurements from other sensors installed on this device1
My question is what is the best approach to be able to delete exact measurements from device sensor’s. What is the best approach to design influxDB v2 bucket schema?
I know about retention policy and this bucket has persistent data so no retention policy is applied.