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
bee817f5
Commit
bee817f5
authored
Sep 25, 2020
by
litaolemo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
120af132
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
out_put_user_post_each_strategy.py
output/out_put_user_post_each_strategy.py
+0
-0
spark_test.py
task/spark_test.py
+10
-6
No files found.
output/out_put_user_post_each_strategy.py
0 → 100644
View file @
bee817f5
This diff is collapsed.
Click to expand it.
task/spark_test.py
View file @
bee817f5
...
...
@@ -80,16 +80,20 @@ spark.sql("CREATE TEMPORARY FUNCTION arrayMerge AS 'com.gmei.hive.common.udf.UDF
sql_search_ctr
=
r"""
SELECT
count(1)
from
SELECT
cl_id,
card_id,
transaction_type,
count(distinct app_session_id) as session_pv
FROM
(
SELECT
cl_id,
card_id,
app_session_id
app_session_id,
transaction_type
from online.ml_community_precise_exposure_detail
WHERE partition_date>=
'
{today_str}'
WHERE partition_date>=
'$
{today_str}'
AND action in ('page_precise_exposure','home_choiceness_card_exposure') --7745版本action改为page_precise_exposure
AND is_exposure = '1' ----精准曝光
AND page_name ='home'
...
...
@@ -103,7 +107,7 @@ SELECT
transaction_type,
card_id,
app_session_id
)
)
a group by cl_id,card_id,transaction_type
"""
.
format
(
today_str
=
'20200922'
)
print
(
sql_search_ctr
)
...
...
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