Combining influxdb series & measurements after renaming an entity?

I updated my home assistant modbus sensor config after getting some more metering equipment. This resulted in a new entity id which in turn pushed the new entity id into influxdb. I also took this time to correct the units which I had defined as lower case to their proper upper case units.

Is there a way to combine these old and new series (and/or measurements?) so that I don’t have two data series? Effectively getting rid of the old one and merging it into the new one?

I would imagine that if it could be done, I would need to do it via the CLI. Since I run this in a container, I can access it via docker exec.

Hello @poldim,
What version of InfluxDB are you using?
If you don’t have a ton of data you could execute this with Flux. By using map() or rename() functions to change values and then writing the data back with the to() function.
Then you could delete the old data with: