Delete Record from InfluxDB using node-RED

Dear All,

I am using InfluxDB to store my sensor data. Currently, we are using node-RED to insert the record into InfluxDB.

Now I would like to put a condition to validate the noise in the sensor data. If noise is detected, then I would like to delete the record, which is stored in the InfluxDB using node-red.

Please let me know how to delete a record from InfluxDB using node-RED

Thanks & Regards
Varun

Can you provide bit more context? Personally, I would go the other way - measure/collect much more often , then decide on how to identify and ignore periods where the data is deemed untrustworthy in post / during down sampling . But perhaps there’s good reason why you want to filter out noise at the collection stage?

Hi

Thanks for your response.

We have installed sensors in the filed which reports data at every 15mins interval of time. Sometimes data received from these sensors are noise.

Example:
145678
145679
145685
145660 --> This is a noise. Suddenly some value is reduced and corrected after sometime
145687
145688

So this noise data we need to delete from the InfluxDB by validating above scenario in node-RED.

Note: We will not be able to do delayed write to InfluxDB as it will impact on time stamp of data which is stored in InfluxDB.

Please let me know how to do this.

Thanks & Regards
Varun

Again, there might be some reason to continue your approach. But I would suggest that you collect all, then clean.

Take a look here

Ie. The bucket you currently write data to , let’s name it raw data.

You then create continuous query to extract data from raw and write it into another database named cleanedData, but instead of downsampling, you skip records that a deemed to be noise. This approach has the advantage that you can always go and look at all recorded data, even measure the rate of change in noise !

It also gives flexibility to adjust how you decide what is noise if your requirements change in future.

Thanks for your feedback. I am planning to use the method what you suggested. Is there a way to select the record using Node-RED for post processing to delete the noise and insert into cleanDB

Thanks
Varun

Thanks A lot, I got the solution. As suggested by you I am going to use post processing. Using "In node-Red "node I am able to query the table.

Now I am looking for a method to insert the records after post processing. That is noise eliminated records I need to insert in batch mode
Thanks & Records
Varun