Commit a2403e55 authored by 高雅喆's avatar 高雅喆

rm write to local csv since permission denied

parent 23641909
...@@ -123,14 +123,10 @@ object WeafareStat { ...@@ -123,14 +123,10 @@ object WeafareStat {
.join(txt_clk_count,"stat_date") .join(txt_clk_count,"stat_date")
.join(txt_meigou_count,"stat_date") .join(txt_meigou_count,"stat_date")
result.withColumn("video_rate",result.col("video_meigou_count")/result.col("video_clk_count")) val result1 = result.withColumn("video_rate",result.col("video_meigou_count")/result.col("video_clk_count"))
result.withColumn("txt_rate",result.col("txt_meigou_count")/result.col("txt_clk_count")) val result2 = result.withColumn("txt_rate",result.col("txt_meigou_count")/result.col("txt_clk_count"))
result.show() result2.show()
val output = "/data2/model/eda/gray_stat/welfare_detail_count_fromvideo.csv"
result.repartition(1)
.write.format("com.databricks.spark.csv")
.option("header","true").save(output)
sc.stop() sc.stop()
......
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