Commit c49b874b authored by 王志伟's avatar 王志伟

统计like项目

parent d4eaf07d
......@@ -581,7 +581,7 @@ object alpha_ctr {
)
click_count_focus.show()
val expoure_count_recommend = sc.sql(
sc.sql(
s"""
|select params['exposure_cards'] as exposure_cards
|from bl.bl_alpha_et_mg_maidianlog_inc_d
......@@ -590,14 +590,19 @@ object alpha_ctr {
|and type = 'page_precise_exposure'
|and partition_day='${partition_date}'
""".stripMargin
)
expoure_count_recommend.rdd.map(row =>{
).rdd.map(row => {
val lenth=row.toSeq.length
println(lenth)
(stat_date,lenth)
})
/*.rdd
.map(row =>{
val s = row.getAs[List[String]]("exposure_cards")
(stat_date,s)
})
//.reduceByKey((x,y) => x + y)
.toDF("stat_date","count").show()
*/
......
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