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
012927a5
Commit
012927a5
authored
Aug 13, 2026
by
hejiangming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
84e3915a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
dwt_bs_top100.py
Pyspark_job/sqoop_export/dwt_bs_top100.py
+7
-3
dwt_bs_top100_change_rate.py
Pyspark_job/sqoop_export/dwt_bs_top100_change_rate.py
+3
-0
No files found.
Pyspark_job/sqoop_export/dwt_bs_top100.py
View file @
012927a5
...
@@ -26,11 +26,15 @@ if __name__ == '__main__':
...
@@ -26,11 +26,15 @@ if __name__ == '__main__':
print
(
f
"执行参数为{sys.argv}"
)
print
(
f
"执行参数为{sys.argv}"
)
# ============================================================
# ============================================================
# 数据有效范围守卫:品类调研仅 us + month + 从 2025-07 起(到最新月)。
# 数据有效范围守卫:品类调研仅 us + month + 从 2024-07 起(到最新月)。
# 24-07~25-06 这 12 个月原是为算 25-07 起的同比补的基准月(只算 Hive 不导出),现放开导出,
# 单纯供页面趋势图回看两年;页面主体(列表/详情)仍只展示 25-07 起,这段不对外显示。
# 同比环比表不跟着放开,理由见 dwt_bs_top100_change_rate.py 的同名守卫。
# 旧:只导 25-07 起 —— and tuple(map(int, str(date_info).split('-'))) >= (2025, 7)
# ============================================================
# ============================================================
if
not
(
site_name
==
'us'
and
date_type
==
'month'
if
not
(
site_name
==
'us'
and
date_type
==
'month'
and
tuple
(
map
(
int
,
str
(
date_info
)
.
split
(
'-'
)))
>=
(
202
5
,
7
)):
and
tuple
(
map
(
int
,
str
(
date_info
)
.
split
(
'-'
)))
>=
(
202
4
,
7
)):
print
(
f
"[SKIP] 参数不在有效范围(仅 us/month/date_info>=202
5
-07):site={site_name} type={date_type} date={date_info},跳过导出"
)
print
(
f
"[SKIP] 参数不在有效范围(仅 us/month/date_info>=202
4
-07):site={site_name} type={date_type} date={date_info},跳过导出"
)
sys
.
exit
(
0
)
sys
.
exit
(
0
)
# 品类调研只有月粒度
# 品类调研只有月粒度
...
...
Pyspark_job/sqoop_export/dwt_bs_top100_change_rate.py
View file @
012927a5
...
@@ -27,6 +27,9 @@ if __name__ == '__main__':
...
@@ -27,6 +27,9 @@ if __name__ == '__main__':
# ============================================================
# ============================================================
# 数据有效范围守卫:品类调研仅 us + month + 从 2025-07 起(到最新月)。
# 数据有效范围守卫:品类调研仅 us + month + 从 2025-07 起(到最新月)。
# 【不跟主表一起放开到 24-07】主表已放开到 24-07 供趋势图回看,但同比环比不能跟:
# 算 24-07 的同比要 23-07 的主表分区,而主表最早只补到 24-07,对比期缺失会全落 1000 占位
# 这里保持 25-07 当护栏,24-07~25-06 也不需要同比环比(页面不显示这段)。
# ============================================================
# ============================================================
if
not
(
site_name
==
'us'
and
date_type
==
'month'
if
not
(
site_name
==
'us'
and
date_type
==
'month'
and
tuple
(
map
(
int
,
str
(
date_info
)
.
split
(
'-'
)))
>=
(
2025
,
7
)):
and
tuple
(
map
(
int
,
str
(
date_info
)
.
split
(
'-'
)))
>=
(
2025
,
7
)):
...
...
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