# Measurement modification error

**URL:** <https://community.influxdata.com/t/measurement-modification-error/27600>\
**Category:** InfluxDB 2\
**Tags:** influxdb\
**Created:** [December 3, 2022, 9:36pm UTC](https://community.influxdata.com/t/measurement-modification-error/27600 "2022-12-03T21:36:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Miguel\_Roque](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/miguel_roque/32/11555_2.png) [@Miguel\_Roque](https://community.influxdata.com/u/Miguel_Roque)\
**Post date:** [December 3, 2022, 9:36pm UTC](https://community.influxdata.com/t/measurement-modification-error/27600/1 "2022-12-03T21:36:38Z")

</div>

i tried to modify some data from la serie, but data have been lost. I notice that field list have changed.  
Before:  
time dc host tag\_value topic value

* * *

1662415610882756732 tos-r3 puertos/mod\_0001/D\_temp1 85  
1670091821006288178 tos-r3 puertos/mod\_0001/D\_temp1 85

Modify

> INSERT mqtt\_consumer host=“tos-r3”,topic=“puertos/mod\_0001/D\_temp1”,value=30.0 1662415610882756732  
> INSERT mqtt\_consumer host=“tos-r3”,topic=“puertos/mod\_0001/D\_temp1”,value=30.0 1670091821006288178

After:  
time dc host **host\_1** tag\_value topic **topic\_1** value

* * *

1662415610882756732 tos-r3 puertos/mod\_0001/D\_temp1 30  
1670091821006288178 tos-r3 puertos/mod\_0001/D\_temp1 30

Those fields were added and the full measurement doesn´t work.  
Can I fix this?  
thanks.

---

<div class="post-metadata">

**Author:** ![Giovanni\_Luisotto](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/giovanni_luisotto/32/4017_2.png) [@Giovanni\_Luisotto](https://community.influxdata.com/u/Giovanni_Luisotto)\
**Post date:** [December 5, 2022, 12:01pm UTC](https://community.influxdata.com/t/measurement-modification-error/27600/2 "2022-12-05T12:01:39Z")

</div>

Looking at your insert and before/after situation this should be your schema

- **tags** : `dc,host`
- **fields** : `value`

You wanted to override some data, but the insert went wrong (because it’s not written properly, read about [line protocol](https://docs.influxdata.com/influxdb/cloud/reference/syntax/line-protocol/)) and your schema is now messed up.

Your insert added all the values as **fields** , but since the key already existed as tag the suffix `_1` has been added.  
The data is not lost at all but since you are filtering on tags those points are excluded.

**How to FIx it**

- Delete the data at the defined timestamp, since you can’t filter this delete with anything but measurement and time (you can filter deletes by measurement,time and tags), I suggest you export all the data at that defined timestamp so you can re-insert the data you want to keep
- Deleting the data should also fix your schema, as no point will have that field keys
- Insert your data, in the proper way this time… might look like the line below

```auto
INSERT mqtt_consumer,host=tos-r3,topic=puertos/mod_0001/D_temp1 value=30i 1662415610882756732

```

note that it makes difference to use integer (append `i` →`30i`) or floats (just `30`), and it might mess up your some stuff (at least temporarily), check for the correct datatype before writing the insert

---

<div class="post-metadata">

**Author:** ![Miguel\_Roque](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/miguel_roque/32/11555_2.png) [@Miguel\_Roque](https://community.influxdata.com/u/Miguel_Roque)\
**Post date:** [December 5, 2022, 1:12pm UTC](https://community.influxdata.com/t/measurement-modification-error/27600/3 "2022-12-05T13:12:26Z")

</div>

Thanks a lot, Giovanni.  
I understood your recommendation but it isn´t working any select instruction about old series (all series of database) before the modification only i can select wrong data.  
How can i export old data, even i can’t see it from grafana explore.  
How you can delete only wrong data?

---

<div class="post-metadata">

**Author:** ![Giovanni\_Luisotto](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/giovanni_luisotto/32/4017_2.png) [@Giovanni\_Luisotto](https://community.influxdata.com/u/Giovanni_Luisotto)\
**Post date:** [December 5, 2022, 1:31pm UTC](https://community.influxdata.com/t/measurement-modification-error/27600/4 "2022-12-05T13:31:53Z")

</div>

> any select instruction about old series (all series of database) before the modification only i can select wrong data.

I don’t understand what you mean by that, the data themselves should be fine and a plain select should work.  
something like  
`SELECT * FROM mqtt_consumer WHERE time = 1662415610882756732` should return the “wrong data”

---

<div class="post-metadata">

**Author:** ![Miguel\_Roque](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/miguel_roque/32/11555_2.png) [@Miguel\_Roque](https://community.influxdata.com/u/Miguel_Roque)\
**Post date:** [December 5, 2022, 1:55pm UTC](https://community.influxdata.com/t/measurement-modification-error/27600/5 "2022-12-05T13:55:03Z")

</div>

Thanks, Giovanni but apparently all data has been lost.  
Any select return no one value.  
Is there some UI Admin data of database?  
Thanks a lot for your help.

---

<div class="post-metadata">

**Author:** ![Giovanni\_Luisotto](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/giovanni_luisotto/32/4017_2.png) [@Giovanni\_Luisotto](https://community.influxdata.com/u/Giovanni_Luisotto)\
**Post date:** [December 5, 2022, 2:19pm UTC](https://community.influxdata.com/t/measurement-modification-error/27600/6 "2022-12-05T14:19:57Z")

</div>

InfluxDB 2 should have its own Web UI, but I ignore what you can do from it, the other option is the [CLI](https://docs.influxdata.com/influxdb/v2.5/reference/cli/influx/)
