Hi,
I’m writing some data from sensors via Telegraf (MQTT Plugin) to InfluxDB.
Works fine so far.
But when I change the data type of sensor values, I have an issue.
For example I wrote measurements with a field named “PH1_SOIL”. I noticed that the written value is a string, which makes it more difficult to process that data later (e.g. in Grafana). Hence I changed it to a float value. But now the value is no longer written to InfluxDB. I looked a bit around and came to the conclusion, that InfluxDB has a hard time when a field with the same name has different data types. So I deleted all series (think that’s the right term) in that bucket and measurement, that has the field "“PH1_SOIL”. When I query the database nothing is found with that field name any longer. But still I can not write a numerical value with that name. If I rename it, e.g. “PH_SOIL” or “PH2_SOIL” I can write values without issues.
I asked my friend ChatGPT and it stated that InfluxDB stores something like metadata that keeps the relation between field names and datatypes, even if there is no data with that field name stored.
Since ChatGPT is not the most reliable friend I have: is that true?
and if “yes”, is there a way to remove that field name / datatype relation from the metadata?