Commit 06db23ba authored by 王志伟's avatar 王志伟

添加maidian

parent 10a357a9
......@@ -485,11 +485,14 @@ object icon_train_data {
//日记本点击数据
val diary_click=sc.sql(
s"""
|select cl_id as device_id, params['diary_id'] as diary_id
|select cl_id as device_id,
|if(action='on_click_diary_card',params['diary_id'],
|if(action='on_click_card' and params['card_content_type']='diary',params['card_id']
|)) as diary_id
|from online.tl_hdfs_maidian_view
|where action = 'on_click_diary_card'
|where action in ('on_click_diary_card','on_click_card')
|and partition_date='${partition_date}'
|and params['diary_id'] is not null
|and (params['diary_id'] is not null) or (params['card_id'] is not null)
""".stripMargin
)
diary_click.show()
......@@ -530,11 +533,14 @@ object icon_train_data {
val meigou_click=sc.sql(
s"""
|select cl_id as device_id, params['service_id'] as service_id
|select cl_id as device_id,
|if(action='goto_welfare_detail',params['service_id'],
|if(action='on_click_card' and params['card_content_type']='service',params['card_id']
|))as service_id
|from online.tl_hdfs_maidian_view
|where action = 'goto_welfare_detail'
|where action in ('goto_welfare_detail','on_click_card')
|and partition_date='${partition_date}'
|and params['service_id'] is not null
|and (params['service_id'] is not null) or (params['card_id'] is not null)
""".stripMargin
)
meigou_click.show()
......@@ -631,7 +637,7 @@ object icon_train_data {
|SELECT cl_id as device_id,params['business_id'] as wiki_id
|from online.tl_hdfs_maidian_view
|where partition_date='${partition_date}'
|and (action='Search_result_wiki_click_item' or action='search_result_click_infomation_item' or action='search_result_wiki_click_recommend_wiki')
|and action in ('Search_result_wiki_click_item','search_result_click_infomation_item', 'search_result_wiki_click_recommend_wiki')
""".stripMargin
)
wiki_click.createOrReplaceTempView("wiki_click")
......
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