1

i am collecting data from telegraf plugins into influxDB. the data was reporting as integer since the begining, but one day it started reporting as float and now i see the below error in the logs:

field type conflict: input field “pid_count” on measurement “procstat_lookup” is type float, already exists as type integer dropped=416; discarding points

after reading some threads on github i came to know that Types for fields are done at the shard level so each shard can have a different type.

how can i identify those shards that has float type data so that i can delete them and data loading may start again.

  • I think you might be mistaken. If I understand correctly, the field type in your database is integer but the incoming data is float and is dropped. So you probably don't have any shards where the field is of type float. Furthermore if you are using the open source version of InfluxDB you only have a single shard for a specific time period. So you could convert the new data to int or try to convert all previous data to float, or do something else – Nikolay Hüttenberend Oct 09 '19 at 14:03
  • @NikolayManolov thanks for the response.. but how did the data type of the incoming data suddenly change? any suggestion about how can this be fixed? – Tushar Mazumdar Oct 09 '19 at 15:02
  • I don't know what your specific case is and how the data is handled but I can give you a couple of scenarios from my experience. It could be that the data type did not change. It could be that you had decimal numbers with zero decimal part at the beginning, e.g. 1.0, and at some place in the data pipeline that was read as just 1 and then influxdb naturally interpreted it as integer and created the measurement/field accordingly. Now you started receiving numbers with non-zero decimal part and the influxdb is complaining. – Nikolay Hüttenberend Oct 09 '19 at 15:50
  • can i delete the float type fields and let the integer type data type remain so that this conflict may get resolved? – Tushar Mazumdar Oct 09 '19 at 21:22
  • Maybe I don't understand. I thought the data that is saved in influxdb is integer. The new data that is coming in is float. But float data can't be saved in integer fields. So no float data is saved. So there is no float data to delete. And even if there is saved float data and you delete it, new float data coming in will still fail to save. Does that make sense? – Nikolay Hüttenberend Oct 10 '19 at 08:25
  • thanks @NikolayManolov.. but when i do `show field keys from rt.table` i can see same field with two different data types. for example, let's say there is this measurement named table has a field named f1, then if i run the above query the output shows **f1 integer and f1 float**. is there a way to fix this situation without having to create a new measurement altogether. as far as i have researched about influxdb i have come to know that it is not possible to delete a column in influxdb and since i am using the open source influxdb i have shards for time periods only as you said. – Tushar Mazumdar Nov 05 '19 at 08:12

0 Answers0