Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
meta_base_code
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黎涛
meta_base_code
Commits
aa619a16
Commit
aa619a16
authored
Sep 28, 2020
by
litaolemo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
0836ca0f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
search_tractate_ctr.py
task/search_tractate_ctr.py
+6
-6
No files found.
task/search_tractate_ctr.py
View file @
aa619a16
...
...
@@ -147,7 +147,8 @@ for t in range(1, task_days):
GROUP BY cl_id,partition_date
)t2
ON t1.partition_day=t2.partition_date AND t1.device_id=t2.cl_id
left join
)exp
left join
(
SELECT DISTINCT device_id
FROM ml.ml_d_ct_dv_devicespam_d --去除机构刷单设备,即作弊设备(浏览和曝光事件去除)
...
...
@@ -157,7 +158,7 @@ for t in range(1, task_days):
SELECT DISTINCT device_id
FROM dim.dim_device_user_staff --去除内网用户
)spam_pv
on spam_pv.device_id=
t1
.device_id
on spam_pv.device_id=
exp
.device_id
LEFT JOIN
(
SELECT partition_date,device_id
...
...
@@ -208,10 +209,9 @@ for t in range(1, task_days):
on t1.user_id=t2.user_id
group by partition_date,device_id
)dev
on
t1
.device_id=dev.device_id
WHERE (
t1.device_id IS NULL or t1
.device_id = '')
on
exp
.device_id=dev.device_id
WHERE (
exp.device_id IS NULL or exp
.device_id = '')
and (dev.device_id is null or dev.device_id='')
)exp
JOIN
(
SELECT partition_date,device_id,t2.active_type,t2.channel,t2.device_os_type
...
...
@@ -276,4 +276,4 @@ for t in range(1, task_days):
db
.
commit
()
print
(
res
)
# cursor.executemany()
db
.
close
()
#
db.close()
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