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

rm db name in sql

parent 8aafd80f
......@@ -48,9 +48,9 @@ object WeafareStat {
val video_cids = sc.sql(
s"""
|select distinct(cid_id) as cid_id
|from jerry_prod.data_feed_click
|from data_feed_click
|where cid_type = 'diary'
|and cid_id in (select cid from jerry_prod.diary_video where stat_date='2018-10-17')
|and cid_id in (select cid from diary_video where stat_date='2018-10-17')
|and stat_date ='2018-10-17'
""".stripMargin
)
......@@ -60,9 +60,9 @@ object WeafareStat {
val txt_cids = sc.sql(
s"""
|select distinct(cid_id) as cid_id
|from jerry_prod.data_feed_click
|from data_feed_click
|where cid_type = 'diary'
|and cid_id not in (select cid from jerry_prod.diary_video where stat_date='2018-10-17')
|and cid_id not in (select cid from diary_video where stat_date='2018-10-17')
|and stat_date ='2018-10-17'
""".stripMargin
)
......@@ -80,7 +80,7 @@ object WeafareStat {
""".stripMargin
)
video_count.show()
val output1 = "/home/gaoyazhe/test_vd_cids.csv"
val output1 = "./test_vd_cids.csv"
video_count.repartition(1).write.format("com.databricks.spark.csv").option("header","true").save(output1)
val txt_count = sc.sql(
......@@ -94,7 +94,7 @@ object WeafareStat {
""".stripMargin
)
txt_count.show()
val output2 = "/home/gaoyazhe/test_txt_cids.csv"
val output2 = "./test_txt_cids.csv"
txt_count.repartition(1).write.format("com.databricks.spark.csv").option("header","true").save(output2)
......
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