How to delete BAD DATA from a table

Sometimes sensors sends bad data and spikes… which make the charts unreadable like the attached.

My question is : How to delete the bad values

Here in my example I can list my bad data by entering > select * from GardenT where value <0 my bad values are negative most of the time.

I have tried many options… none no success

Thanks for your help
Screenshot 2021-06-06 101042

you can’t delete data based on a filed value, just tag values or time (see docs).

Therefore if the sensor sends bad data for a defined range of time you can delete just that interval of data. (if you have several sensors you can filter by tags like SensorID or any other tag).

The other “solution” is to exclude those values while reading the data, but that’s up to the query itself.

If you can share something more about your use case I might have some other idea.

Thank you Giovanni,

I have no IDEA how to tag these values and thn delete tag tag_values…?

I like Influx but I miss MySQLadmin when it get complicated.


as you know Influx is not a SQL database and it has its own rules, look at the key concepts here

you can’t edit your data after inserting them, therefore you can’t add tags to filter your delete, unless they are already present.

but I got another idea, you can override an existing value if you know the key of the point (series + timestamp) by just making an insert with the new field value. if appropriate you can override/update your data with 0.