Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
ffm-baseline
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ML
ffm-baseline
Commits
5a491ca2
Commit
5a491ca2
authored
Dec 28, 2018
by
王志伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
smart_rank 相关的统计指标
parent
b3671933
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
11 deletions
+46
-11
temp_analysis.scala
eda/feededa/src/main/scala/com/gmei/temp_analysis.scala
+46
-11
No files found.
eda/feededa/src/main/scala/com/gmei/temp_analysis.scala
View file @
5a491ca2
...
@@ -615,17 +615,52 @@ object smart_rank_count {
...
@@ -615,17 +615,52 @@ object smart_rank_count {
final_id
.
createOrReplaceTempView
(
"final_id"
)
final_id
.
createOrReplaceTempView
(
"final_id"
)
val
meigou_price
=
sc
.
sql
(
val
meigou_pv
=
sc
.
sql
(
s
"""
s
"""
|select cl_id,city_id,params['business_id'] as meigou_id
|select *
|from online.tl_hdfs_maidian_view
|from online.tl_hdfs_maidian_view
|where action = "page_view"
|where action = "page_view"
|and params['page_name']="welfare_detail"
|and params['page_name']="welfare_detail"
|and partition_date ='20181201'
|and partition_date ='20181201'
|LIMIT 10
|LIMIT 3
"""
.
stripMargin
"""
.
stripMargin
)
)
meigou_price
.
show
(
80
)
meigou_pv
.
show
(
80
)
// val zixun_pv = sc.sql(
// s"""
// |select cl_id,city_id,params['service_id'] as meigou_id
// |from online.tl_hdfs_maidian_view
// |where partition_date > '20171118'
// |and action = 'welfare_detail_click_message'
// """.stripMargin
// )
// zixun_pv.show(80)
// val meigou_price = sc.sql(
// s"""
// |select md.user_id,sum(md.gengmei_price) as pay_all
// |from online.ml_meigou_order_detail md
// |left join
// |(
// | SELECT
// | order_id
// | FROM mining.ml_order_spam_recognize
// | WHERE partition_date='20181223' AND
// | self_support=0 AND dayBitsGetW1(predict_result,'20181223')=0
// |)spam
// |on md.order_id = spam.order_id
// |where md.status= 2
// |and spam.order_id is null
// |and md.partition_date = '20181223'
// |and md.pay_time is not null
// |and md.validate_time>'2017-01-01 00:00:00.0'
// |group by md.user_id
// |order by sum(md.gengmei_price)
// """.stripMargin
// )
// GmeiConfig.writeToJDBCTable(meigou_price, "meigou_price", SaveMode.Overwrite)
// GmeiConfig.writeToJDBCTable(meigou_price, "meigou_price", SaveMode.Overwrite)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment