简体   繁体   中英

transfer data between databases - influx-python

I am trying to write points that been taken from one database to another (influxdb-python), I have created a list of dict, and I am using write_points('list of dicts'). I even tried to simplify things by getting only 2 points.

here is my code and the errors, pls help

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)

在此处输入图片说明

使用INTO子句从一个数据库写入另一个数据库比通过外部库导出和导入点要容易得多。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM