This commit is contained in:
guange 2019-01-18 15:23:00 +08:00
parent 20c6202d28
commit 06f2e1c990
1 changed files with 1 additions and 1 deletions

View File

@ -92,7 +92,7 @@ def collect_from_type(spark):
for row in df.rdd.collect():
if row["from_type"]:
data[row["from_type"]] = row["N"]
mysql_execute("update datas set data = {} where `key` = 'from_type'".format( json.dumps(data) ))
mysql_execute("update datas set data = '{}' where `key` = 'from_type'".format( json.dumps(data) ))
if __name__ == "__main__":