Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
Amazon-Selection-Data
Overview
Overview
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
abel_cjy
Amazon-Selection-Data
Commits
c9083973
Commit
c9083973
authored
Sep 03, 2026
by
chenyuanjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
流量选品-变体销量趋势图
parent
1165e91b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
dwt_amazon_report.py
Pyspark_job/dwt/dwt_amazon_report.py
+7
-4
No files found.
Pyspark_job/dwt/dwt_amazon_report.py
View file @
c9083973
...
@@ -39,7 +39,8 @@ class DwtAmazonReport(Templates):
...
@@ -39,7 +39,8 @@ class DwtAmazonReport(Templates):
asin_zr_counts as new_zr_count,
asin_zr_counts as new_zr_count,
asin_sp_counts as new_sp_count,
asin_sp_counts as new_sp_count,
asin_st_counts as new_total_count,
asin_st_counts as new_total_count,
date_info as new_date_info_list
date_info as new_date_info_list,
variation_bought_month as new_variation_monthly_sales
from dwt_flow_asin
from dwt_flow_asin
where site_name = '{self.site_name}'
where site_name = '{self.site_name}'
and date_type = '{self.date_type}'
and date_type = '{self.date_type}'
...
@@ -56,7 +57,8 @@ class DwtAmazonReport(Templates):
...
@@ -56,7 +57,8 @@ class DwtAmazonReport(Templates):
zr_count as old_zr_count,
zr_count as old_zr_count,
sp_count as old_sp_count,
sp_count as old_sp_count,
total_count as old_total_count,
total_count as old_total_count,
date_info_list as old_date_info_list
date_info_list as old_date_info_list,
variation_monthly_sales as old_variation_monthly_sales
from dwt_amazon_report
from dwt_amazon_report
where site_name = '{self.site_name}'
where site_name = '{self.site_name}'
and date_type = '{self.date_type}'
and date_type = '{self.date_type}'
...
@@ -66,8 +68,9 @@ class DwtAmazonReport(Templates):
...
@@ -66,8 +68,9 @@ class DwtAmazonReport(Templates):
self
.
df_asin_detail_old
.
show
(
10
,
truncate
=
True
)
self
.
df_asin_detail_old
.
show
(
10
,
truncate
=
True
)
def
handle_data
(
self
):
def
handle_data
(
self
):
# 关联后的列名
# 关联后的列名(新增字段放末尾)
join_columns
=
[
'monthly_sales'
,
'zr_count'
,
'sp_count'
,
'total_count'
,
'date_info_list'
]
join_columns
=
[
'monthly_sales'
,
'zr_count'
,
'sp_count'
,
'total_count'
,
'date_info_list'
,
'variation_monthly_sales'
]
# 获取历史df对象中,date_info的数量,用来确定关联不到的历史asin填充多少个 -1
# 获取历史df对象中,date_info的数量,用来确定关联不到的历史asin填充多少个 -1
old_date_info_first
=
self
.
df_asin_detail_old
.
select
(
'old_date_info_list'
)
.
distinct
()
.
first
()
old_date_info_first
=
self
.
df_asin_detail_old
.
select
(
'old_date_info_list'
)
.
distinct
()
.
first
()
if
old_date_info_first
is
None
:
if
old_date_info_first
is
None
:
...
...
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