1

I created multiple fields to test output in grafana, however I want to delete the unwanted fields from influxdb, is there a way?

Rohitesh
  • 1,514
  • 7
  • 28
  • 51
yellow
  • 425
  • 7
  • 20
  • There is a useful answer on this similar question: https://stackoverflow.com/questions/26767148/how-to-delete-columns-of-a-series-in-influxdb/ – didwefixit Jun 02 '20 at 09:08

1 Answers1

3

Q: I want to delete the unwanted fields from influxdb, is there a way?

A: Short answer. No. Up until the latest release 1.4.0, there is no straightforward way to do this.

The reason why this is so was because Influxdb is explicitly designed to optimise point creation. Thus functionalities for the "UPDATE" and "DELETE" side of things are compromised for it.

To drop fields of a given measurement, the easiest way would be to;

  1. Retrieve the data out first
  2. Modify its content
  3. Drop the measurement
  4. Re-insert the modified data back

Reference:

https://docs.influxdata.com/influxdb/v1.4/concepts/insights_tradeoffs/

Samuel Toh
  • 18,006
  • 3
  • 24
  • 39