Darko P.
Darko P.

Reputation: 595

How to delete columns of a series in InfluxDB

Is there any solution to remove a specific column of a series in InfluxDB?

Its seems that this feature is not implemented. But does anybody have found any kind of trick to do that?

Upvotes: 22

Views: 24174

Answers (3)

Mr. Tea
Mr. Tea

Reputation: 76

I know this question is a bit stale, but Influx still does not have this feature. We can only speculate about why not.

As I mentioned in this question, though, since Influx just uses binary files for data and metadata you "just" have to figure out the formatting to edit these files. Luckily, it seems some people have already done this for you. In my search, I found Infix, from ABC Arbitrage, which provides a command-line tool to rename, remove, and modify columns on Influx database files. The drawback is that it requires stopping the Influx service, so if you have a system that is not tolerant of downtime, you may still be out of luck.

Upvotes: 0

Anku
Anku

Reputation: 1

Probably too late, but you can use

USE table_name, DROP SERIES FROM "my_column_name"

https://docs.influxdata.com/influxdb/v1.8/query_language/manage-database/#drop-series-from-the-index-with-drop-series

Upvotes: -3

Dan Dascalescu
Dan Dascalescu

Reputation: 151694

There is no way to delete a "column" (i.e. a field or a tag) from an Influx measurement. Here's the feature request for that.

You'll have to SELECT INTO a different measurement, excluding the columns you don't want:

SELECT useful_field, nice_tag INTO new_measurement FROM measurement

Upvotes: 13

Related Questions