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

增加新埋点

parent 37468234
......@@ -483,7 +483,7 @@ object icon_train_data {
val partition_date = stat_date.replace("-","")
//日记本点击数据
val diary_click=sc.sql(
val diary_click_1=sc.sql(
s"""
|select cl_id as device_id, params['diary_id'] as diary_id
|from online.tl_hdfs_maidian_view
......@@ -492,9 +492,33 @@ object icon_train_data {
|and params['diary_id'] is not null
""".stripMargin
)
diary_click.show()
diary_click_1.createOrReplaceTempView("diary_click_1")
val diary_click_2=sc.sql(
s"""
|select cl_id as device_id, params['card_id'] as diary_id
|from online.tl_hdfs_maidian_view
|where action = 'on_click_card'
|and params['card_content_type']='diary'
|and partition_date='${partition_date}'
|and params['card_id'] is not null
""".stripMargin
)
diary_click_2.createOrReplaceTempView("diary_click_2")
val diary_click=sc.sql(
s"""
|select *
|from diary_click_1
|union all
|select *
|from diary_click_2
""".stripMargin
)
diary_click.createOrReplaceTempView("diary_click")
val diary_tags = sc.sql(
s"""
|select * from online.tl_hdfs_diary_tags_view
......
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