【发布时间】:2016-01-05 08:23:12
【问题描述】:
我正在尝试将从一个数据库获取的点写入另一个数据库(influxdb-python),我创建了一个 dict 列表,并且我正在使用 write_points('list of dicts')。我什至试图通过只获得 2 分来简化事情。
这是我的代码和错误,请帮助
rs = cli.query("""SELECT * FROM cpu_value WHERE time > now() - 2s""")
points = rs.get_points()
a=next(points)
b=next(points)
temp=[]
temp.append(a)
temp.append(b)
client = InfluxDBClient(database='test')
client.write_points(temp)
【问题讨论】:
-
我看到代码但没有错误。如果没有错误输出,很难判断什么是行不通的。