influxdata / docs.influxdata.com-ARCHIVE

ARCHIVE - 1.x docs for InfluxData
https://archive.docs.influxdata.com/
MIT License
252 stars 292 forks source link

convert fields data type #2882

Closed xiaosuiyue closed 4 years ago

xiaosuiyue commented 4 years ago

The influx version that i used is 1.8 The field I stored was string, but now I want to change the field type to float, and I get an error. How do I convert previously stored data types

sanderson commented 4 years ago

@xiaosuiyue There currently isn't a way to change the type of a field after it's written to InfluxDB. You have a few options:

  1. Create a new field for the new data type.
  2. Delete and rewrite the points that have the wrong data type.

Here are some related links: