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
c7d6584e
Commit
c7d6584e
authored
Sep 15, 2020
by
litaolemo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
4838db2b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
ecommerce_income_report.py
task/ecommerce_income_report.py
+2
-2
No files found.
task/ecommerce_income_report.py
View file @
c7d6584e
...
@@ -413,7 +413,7 @@ group by partition_day
...
@@ -413,7 +413,7 @@ group by partition_day
# cpc_income.cpc_proportion_expend_recharge_amount/cpc_income.cpc_click_num as cpc_item_pricing,
# cpc_income.cpc_proportion_expend_recharge_amount/cpc_income.cpc_click_num as cpc_item_pricing,
# cpc_income.tol_proportion_expend_amount as tol_proportion_expend_amount
# cpc_income.tol_proportion_expend_amount as tol_proportion_expend_amount
# """
# """
print
(
referrer_search_welfare_pv
,
welfare_pv
)
pv_div_dau
=
referrer_search_welfare_pv
/
dau
pv_div_dau
=
referrer_search_welfare_pv
/
dau
pv_div_quanzhong_dau
=
referrer_search_welfare_pv
/
quanzhong_dau
pv_div_quanzhong_dau
=
referrer_search_welfare_pv
/
quanzhong_dau
search_pv_div_all_pv
=
referrer_search_welfare_pv
/
welfare_pv
search_pv_div_all_pv
=
referrer_search_welfare_pv
/
welfare_pv
...
@@ -428,7 +428,7 @@ group by partition_day
...
@@ -428,7 +428,7 @@ group by partition_day
pid
=
hashlib
.
md5
(
partition_date
.
encode
(
"utf8"
))
.
hexdigest
()
pid
=
hashlib
.
md5
(
partition_date
.
encode
(
"utf8"
))
.
hexdigest
()
cpc_daily_click_sql
=
"""replace into ecommerce_income_report(
cpc_daily_click_sql
=
"""replace into ecommerce_income_report(
pv_div_dau,pv_div_quanzhong_dau,ad_flow_rat,budget_consumption_rate,cpc_item_pricing,tol_proportion_expend_amount,partition_day,day_id,pid,search_pv_div_all_pv) VALUES(
pv_div_dau,pv_div_quanzhong_dau,ad_flow_rat,budget_consumption_rate,cpc_item_pricing,tol_proportion_expend_amount,partition_day,day_id,pid,search_pv_div_all_pv) VALUES(
{pv_div_dau},{pv_div_quanzhong_dau},{ad_flow_rat},{budget_consumption_rate},{cpc_item_pricing},{tol_proportion_expend_amount},'{partition_day}','{day_id}','{pid}',
search_pv_div_all_pv
);"""
.
format
(
{pv_div_dau},{pv_div_quanzhong_dau},{ad_flow_rat},{budget_consumption_rate},{cpc_item_pricing},{tol_proportion_expend_amount},'{partition_day}','{day_id}','{pid}',
{search_pv_div_all_pv}
);"""
.
format
(
pv_div_dau
=
pv_div_dau
,
pv_div_quanzhong_dau
=
pv_div_quanzhong_dau
,
ad_flow_rat
=
ad_flow_rat
,
budget_consumption_rate
=
budget_consumption_rate
,
pv_div_dau
=
pv_div_dau
,
pv_div_quanzhong_dau
=
pv_div_quanzhong_dau
,
ad_flow_rat
=
ad_flow_rat
,
budget_consumption_rate
=
budget_consumption_rate
,
cpc_item_pricing
=
cpc_item_pricing
,
tol_proportion_expend_amount
=
tol_proportion_expend_amount
,
partition_day
=
today_str
,
search_pv_div_all_pv
=
search_pv_div_all_pv
,
cpc_item_pricing
=
cpc_item_pricing
,
tol_proportion_expend_amount
=
tol_proportion_expend_amount
,
partition_day
=
today_str
,
search_pv_div_all_pv
=
search_pv_div_all_pv
,
day_id
=
today_str
,
pid
=
pid
day_id
=
today_str
,
pid
=
pid
...
...
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