李莎 2 years ago
parent
commit
7eda14c9c6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      start_mysql.py

+ 1 - 1
start_mysql.py

@@ -47,7 +47,7 @@ def hbase_energy_data(points,table,building):
             data_time = i["data_time"]
             data_value = i["data_value"]
             dt = data_time[0:4]+ "-" + data_time[4:6] + "-" + data_time[6:8]
-            sqlline = "(%s,%s,%s,%s,%s,'%s')" % (building, meter, funcid, data_time, data_value, dt)
+            sqlline = "(%s,'%s',%s,%s,%s,'%s')" % (building, meter, funcid, data_time, data_value, dt)
             sqls.append(sqlline)
     return sqls