I am a beginner of influxdb and I want information.Is it possible update of the measurements??
removed because paste went wrong and noah* was also writing an answer
Can you write a little more about what you’re hoping to accomplish? What do you mean by “update of the measurements?” Do you have a specific use case in mind?
In general, time series data is composed of measurements taken at various point in time. It would be unusual to change the value of a measurement after it was taken. If you record the temperature in a room at 10:00am, for example, that value would remain static.
If you want to change the tags for a measurement, it usually makes sense to create a new series with the updated information and then drop the original series.
It’s unusual to want to update a measurement but not unknown.
For example, what if the device which is supplying the measurement has a bug?
That happened here recently - a firmware update to out monitoring device inadvertently swapped two fields’ data before uploading. The issue was quickly fixed once it was noticed but it meant our Influx database had bad values for a few hours’ worth of measurements.
To answer the question, you can simply overwrite the existing measurement with the correct values.
However if your initial data includes bad field names you are out of luck; there is no way to erase or hide individual fields in an Influx database.
While it’s technically true that you can overwrite the existing measurement, it’s important to understand the particular use case when someone asks whether they can update data in InfluxDB.
When many users ask that question, they are thinking about it in the context of a relational database and CRUD operations, where updates are frequent, and for which InfluxDB is not well suited.
Repairing data caused by a firmware issue causing fields to be swapped is a one-time replacement of the data in storage; once that is done, the data generally won’t be changed again.
I am actually looking for something like that and want to make sure I am doing the right thing before I lose anything (yes I will do backup before attempting anything).
I have realized that I have some temperature sensors reporting in different measurements in influxDB. Some are in “degrees” some are in “°”, some in “°C” and I even have some in “state” as untyped numbers.
I will be fixing my source to have them all to report in “°C”. At that point I will break all my grafana dashboards as the same entity in in different measurements over time.
To fix that I’d like to update all my existing measurements in influxDB for these entity id from whatever measurement they currently are to “°C”.
Any help is appreciated.
In my case, I am working with an application that managements measurement values for electric meters. The problem with these is that they do receive updated measurements for a given meter/timestamp that are of higher quality. When I query the measurements for a given meter over a specific time range, I only care about the most recent measurement value received at that time stamp.
What would be recommended way of accomplishing this?