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
7c3cd023
Commit
7c3cd023
authored
Dec 29, 2018
by
高雅喆
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of git.wanmeizhensuo.com:ML/ffm-baseline
parents
cf9b8f6a
36f68f77
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
temp_analysis.scala
eda/feededa/src/main/scala/com/gmei/temp_analysis.scala
+8
-8
No files found.
eda/feededa/src/main/scala/com/gmei/temp_analysis.scala
View file @
7c3cd023
...
@@ -622,8 +622,8 @@ object smart_rank_count {
...
@@ -622,8 +622,8 @@ object smart_rank_count {
|on ov.cl_id = final_id.device_id
|on ov.cl_id = final_id.device_id
|where ov.action = "page_view"
|where ov.action = "page_view"
|and ov.params['page_name']="welfare_detail"
|and ov.params['page_name']="welfare_detail"
|and ov.partition_date >='20181
2
01'
|and ov.partition_date >='20181
1
01'
|and ov.partition_date <
='20181230
'
|and ov.partition_date <
'20181201
'
|and ov.city_id is not null
|and ov.city_id is not null
|and final_id.device_id is null
|and final_id.device_id is null
"""
.
stripMargin
"""
.
stripMargin
...
@@ -656,7 +656,7 @@ object smart_rank_count {
...
@@ -656,7 +656,7 @@ object smart_rank_count {
val
meigou_pv_count
=
sc
.
sql
(
val
meigou_pv_count
=
sc
.
sql
(
s
"""
s
"""
|select '2018-1
2
' as stat_date,meigou_city,count(device_id) as meigou_pv,count(distinct(device_id)) as meigou_device_num
|select '2018-1
1
' as stat_date,meigou_city,count(device_id) as meigou_pv,count(distinct(device_id)) as meigou_device_num
|from meigou_pv_tongcheng
|from meigou_pv_tongcheng
|where device_city = meigou_city
|where device_city = meigou_city
|group by meigou_city
|group by meigou_city
...
@@ -671,8 +671,8 @@ object smart_rank_count {
...
@@ -671,8 +671,8 @@ object smart_rank_count {
|select ov.cl_id as device_id,ov.city_id as device_city,ov.params['service_id'] as meigou_id
|select ov.cl_id as device_id,ov.city_id as device_city,ov.params['service_id'] as meigou_id
|from online.tl_hdfs_maidian_view ov left join final_id
|from online.tl_hdfs_maidian_view ov left join final_id
|on ov.cl_id = final_id.device_id
|on ov.cl_id = final_id.device_id
|where ov.partition_date >= '20181
2
01'
|where ov.partition_date >= '20181
1
01'
|and ov.partition_date <
='2018123
1'
|and ov.partition_date <
'2018120
1'
|and ov.action = 'welfare_detail_click_message'
|and ov.action = 'welfare_detail_click_message'
|and final_id.device_id is null
|and final_id.device_id is null
"""
.
stripMargin
"""
.
stripMargin
...
@@ -691,7 +691,7 @@ object smart_rank_count {
...
@@ -691,7 +691,7 @@ object smart_rank_count {
val
zixun_pv_count
=
sc
.
sql
(
val
zixun_pv_count
=
sc
.
sql
(
s
"""
s
"""
|select '2018-1
2
' as stat_date,meigou_city,count(device_id) as meigou_zixun,count(distinct(device_id)) as meigou_zixun_device_num
|select '2018-1
1
' as stat_date,meigou_city,count(device_id) as meigou_zixun,count(distinct(device_id)) as meigou_zixun_device_num
|from zixun_meigou_tongcheng
|from zixun_meigou_tongcheng
|where device_city=meigou_city
|where device_city=meigou_city
|group by meigou_city
|group by meigou_city
...
@@ -707,8 +707,8 @@ object smart_rank_count {
...
@@ -707,8 +707,8 @@ object smart_rank_count {
|select first_city,count(distinct(device_id)) as new_device_month
|select first_city,count(distinct(device_id)) as new_device_month
|from online.ml_device_day_active_status
|from online.ml_device_day_active_status
|where active_type != '4'
|where active_type != '4'
|and partition_date >='20181
2
01'
|and partition_date >='20181
1
01'
|and partition_date <
='20181230
'
|and partition_date <
'20181201
'
|group by first_city
|group by first_city
"""
.
stripMargin
"""
.
stripMargin
)
)
...
...
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