使用select * INTO ... FROM ... group by从InfluxDB中删除列

问题描述

我正试图从流入中删除一列。

在我的度量“度量”中,我有以下字段:

fieldKey      fieldType
--------      ---------
delta         float
index_name    string
index_value   integer
redistributed float

我要删除index_nameindex_value

以及标记

name: measures
tagKey
------
conso_prod
index_name
meter_id
operation_id
source

我想放index_name

因此,我将所有需要的字段/标签复制到新的度量中:

select delta INTO measures_test FROM measures group by conso_prod,operation_id,meter_id,source

但是现在,我所有的标签仍然是标签,还有字段,因此它们都是重复的:

name: measures_test
fieldKey      fieldType
--------      ---------
conso_prod    string
delta         float
index_name    string
index_value   integer
meter_id      string
operation_id  string
redistributed float
source        string

name: measures_test
tagKey
------
conso_prod
meter_id
operation_id
source

为什么我所有的标签也都转换为字段?应该使用GROUP BY

修复它

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)