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
cd41c9cb
Commit
cd41c9cb
authored
Nov 04, 2026
by
chenyuanjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merchantwords日志数据完善
parent
f102f9d3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
dim_merchantwords_detail.py
Pyspark_job/dim/dim_merchantwords_detail.py
+5
-1
No files found.
Pyspark_job/dim/dim_merchantwords_detail.py
View file @
cd41c9cb
...
...
@@ -45,6 +45,8 @@ class DimMerchantwordsDetail(object):
])
self
.
save_cols
=
[
'keyword'
,
'volume'
,
'avg3m'
,
'avg12m'
,
'trend'
,
'depth'
,
'strength'
,
'prominence'
,
'appearance'
,
'in_latest_batch'
,
'create_time'
]
# 待爬取keyword总量,用于计算覆盖度
self
.
total_keyword_count
=
222894900
self
.
last_date_info
=
None
self
.
df_today
=
None
self
.
df_history
=
None
...
...
@@ -171,7 +173,9 @@ class DimMerchantwordsDetail(object):
f
"SELECT COUNT(1) AS cnt FROM {self.hive_table} "
f
"WHERE site_name='{self.site_name}' AND date_info='{self.date_info}'"
)
.
collect
()[
0
][
'cnt'
]
print
(
f
"实际写入行数 written_count={written_count:,},预期 new_count={new_count:,}"
)
print
(
f
"历史数据量 old_count={old_count:,},最新数据量 new_count={new_count:,},"
f
"新增keyword数量={new_count - old_count:,},"
f
"覆盖度={new_count / self.total_keyword_count:.2
%
}({new_count:,}/{self.total_keyword_count:,})"
)
if
written_count
!=
new_count
:
print
(
f
"❌ 写入校验失败 written_count={written_count} != new_count={new_count},保留历史分区不删!"
)
return
...
...
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