Commit 97ec8bcd authored by 王志伟's avatar 王志伟

增加新埋点

parent f1389a60
......@@ -552,7 +552,7 @@ object icon_train_data {
// 美购点击数据
val meigou_click=sc.sql(
val meigou_click_1=sc.sql(
s"""
|select cl_id as device_id, params['service_id'] as service_id
|from online.tl_hdfs_maidian_view
......@@ -561,9 +561,38 @@ object icon_train_data {
|and params['service_id'] is not null
""".stripMargin
)
meigou_click.show()
meigou_click_1.show()
meigou_click_1.createOrReplaceTempView("meigou_click_1")
val meigou_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']='service'
|and partition_date='${partition_date}'
|and params['card_id'] is not null
""".stripMargin
)
diary_click_2.createOrReplaceTempView("meigou_click_2")
val meigou_click=sc.sql(
s"""
|select *
|from meigou_click_1
|union all
|select *
|from meigou_click_2
""".stripMargin
)
meigou_click.createOrReplaceTempView("meigou_click")
val megou_order=sc.sql(
s"""
|SELECT device_id,service_id
......
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