2016-01-05 40 views
0

我想寫點從一個數據庫到另一個(influxdb-python),我創建了一個字典的列表,並且我正在使用write_points('list of dicts' )。我甚至試圖通過只得到2分來簡化事情。傳輸數據庫之間的數據 - influx-python

這裏是我的代碼和錯誤,請幫助

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) 

enter image description here

+0

我看到代碼但沒有錯誤。如果沒有錯誤輸出,很難判斷哪些功能無法正常工作。 – beckettsean

回答

0

它更容易使用INTO clause寫從一個數據庫到另一個,而不是出口,並通過外部導入點圖書館。