InfluxQL:Influx DB 将字段从字符串转换为整数

InfluxQL : Influx DB conversion of a field from String to integer

我是 InfluxDB 的新手。 我用时间序列数据填充了流入测量

我有以下测量点

time,host,interface,value
2/11/2019 12:03:08 AM,XYZ_test ,gigabitethernet8/43,"292724"

值是字符串形式我需要使用InfluxQL将列转换为整数或浮点数,怎么办?

使用它,您应该能够将值从浮点数转换为整数。

SELECT column_name::integer FROM table_name

您可以在这里参考 InfluxDB 文档,

https://docs.influxdata.com/influxdb/v1.7/query_language/data_exploration/#cast-float-field-values-to-integers

编辑: 但是,然而,不支持将字符串转换为整数。