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
0436bc65
Commit
0436bc65
authored
Nov 06, 2025
by
chenyuanjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ES异常销量置为0
parent
bcfc0971
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
es_update_with_asin_bought_month.py
Pyspark_job/es_handle/es_update_with_asin_bought_month.py
+2
-2
No files found.
Pyspark_job/es_handle/es_update_with_asin_bought_month.py
View file @
0436bc65
...
@@ -67,7 +67,7 @@ class EsUpdate(object):
...
@@ -67,7 +67,7 @@ class EsUpdate(object):
self
.
df_need_update
=
self
.
df_asin
.
join
(
self
.
df_need_update
=
self
.
df_asin
.
join
(
self
.
df_es_asin
,
on
=
[
'asin'
],
how
=
'inner'
self
.
df_es_asin
,
on
=
[
'asin'
],
how
=
'inner'
)
.
withColumn
(
)
.
withColumn
(
'asin_bought_month'
,
F
.
lit
(
None
)
'asin_bought_month'
,
F
.
lit
(
0
)
)
.
cache
()
)
.
cache
()
print
(
"ES待更新的数据量为:"
,
self
.
df_need_update
.
count
())
print
(
"ES待更新的数据量为:"
,
self
.
df_need_update
.
count
())
print
(
f
"正在更新ES数据,更新索引:{self.index_name}"
)
print
(
f
"正在更新ES数据,更新索引:{self.index_name}"
)
...
@@ -77,7 +77,7 @@ class EsUpdate(object):
...
@@ -77,7 +77,7 @@ class EsUpdate(object):
.
options
(
**
self
.
es_options
)
\
.
options
(
**
self
.
es_options
)
\
.
mode
(
"append"
)
\
.
mode
(
"append"
)
\
.
save
()
.
save
()
print
(
f
"ES
{self.index_name}
索引更新完毕!"
)
print
(
f
"ES
{self.index_name}
索引更新完毕!"
)
except
Exception
as
e
:
except
Exception
as
e
:
print
(
"An error occurred while writing to Elasticsearch:"
,
str
(
e
))
print
(
"An error occurred while writing to Elasticsearch:"
,
str
(
e
))
CommonUtil
.
send_wx_msg
([
'chenyuanjie'
],
'
\u26A0
ES月销数据更新失败'
,
f
'失败索引:{self.index_name}'
)
CommonUtil
.
send_wx_msg
([
'chenyuanjie'
],
'
\u26A0
ES月销数据更新失败'
,
f
'失败索引:{self.index_name}'
)
...
...
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