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
544fead9
Commit
544fead9
authored
Nov 10, 2025
by
chenyuanjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
流量选品-新增uk、de站点异常月销处理
parent
0436bc65
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
es_update_with_asin_bought_month.py
Pyspark_job/es_handle/es_update_with_asin_bought_month.py
+11
-7
No files found.
Pyspark_job/es_handle/es_update_with_asin_bought_month.py
View file @
544fead9
...
...
@@ -17,10 +17,12 @@ __es_passwd__ = "Selection20251#+"
class
EsUpdate
(
object
):
def
__init__
(
self
):
def
__init__
(
self
,
site_name
,
date_info
):
self
.
site_name
=
site_name
self
.
date_info
=
date_info
self
.
spark
=
SparkUtil
.
get_spark_session
(
f
"{self.__class__.__name__}"
)
self
.
index_name
=
"us_st_detail_month_2025_09
"
year
,
month
=
self
.
date_info
.
split
(
'-'
)
self
.
index_name
=
f
"{site_name}_st_detail_month_{year}_{month}
"
self
.
es_options
=
{
"es.nodes"
:
__es_ip__
,
"es.port"
:
__es_port__
,
...
...
@@ -45,10 +47,10 @@ class EsUpdate(object):
self
.
update_es_filed
()
def
get_update_asin
(
self
):
sql
=
"""
select asin from
us_asin_detail_2025_not_buysales
sql
=
f
"""
select asin from
{self.site_name}_asin_detail_2025_buysales_err where date_info = '{self.date_info}'
"""
pg_con_info
=
DBUtil
.
get_connection_info
(
"postgresql_14"
,
"us"
)
pg_con_info
=
DBUtil
.
get_connection_info
(
"postgresql_14"
,
self
.
site_name
)
self
.
df_asin
=
SparkUtil
.
read_jdbc_query
(
session
=
self
.
spark
,
url
=
pg_con_info
[
'url'
],
...
...
@@ -84,5 +86,7 @@ class EsUpdate(object):
if
__name__
==
"__main__"
:
handle_obj
=
EsUpdate
()
site_name
=
sys
.
argv
[
1
]
date_info
=
sys
.
argv
[
2
]
handle_obj
=
EsUpdate
(
site_name
,
date_info
)
handle_obj
.
run
()
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