This commit is contained in:
parent
566b8ba1d3
commit
9e70b0c842
|
@ -82,7 +82,7 @@ def collect_top10_sells(spark):
|
||||||
i = 1
|
i = 1
|
||||||
for row in df.rdd.collect():
|
for row in df.rdd.collect():
|
||||||
mysql_execute("update top10_sells set product_name = {}, good_c = {}, price={} where order_n = {} ".format(
|
mysql_execute("update top10_sells set product_name = {}, good_c = {}, price={} where order_n = {} ".format(
|
||||||
row["name"], row["good_count"], int(row["price"]),i))
|
row["name"], row["good_count"], int(float(row["price"])),i))
|
||||||
i += 1
|
i += 1
|
||||||
|
|
||||||
def collect_from_type(spark):
|
def collect_from_type(spark):
|
||||||
|
|
Loading…
Reference in New Issue