Commit c3ad5e63 authored by 张彦钊's avatar 张彦钊

change test file

parent 1097e6d8
...@@ -201,9 +201,10 @@ def test(): ...@@ -201,9 +201,10 @@ def test():
sql = "select stat_date,cid_id from esmm_train_data e where stat_date = '{}' limit 60".format("2019-04-25") sql = "select stat_date,cid_id from esmm_train_data e where stat_date = '{}' limit 60".format("2019-04-25")
df = spark.sql(sql) df = spark.sql(sql)
df.show(6)
# df.write.csv('/recommend/tr', mode='overwrite', header=True) # df.write.csv('/recommend/tr', mode='overwrite', header=True)
df.select("stat_date", "cid_id").write.format("avro").save("/recommend/tr/avro.csv") df.write.format("avro").save("/recommend/tr")
# df.write.format("avro").save("/recommend/tr/avro.csv") # df.write.format("avro").save("/recommend/tr/avro.csv")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment