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
7e007607
Commit
7e007607
authored
Nov 11, 2025
by
chenyuanjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
d6f0567c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
export_asin_detail_base.py
Pyspark_job/script/export_asin_detail_base.py
+7
-3
No files found.
Pyspark_job/script/export_asin_detail_base.py
View file @
7e007607
...
...
@@ -53,7 +53,8 @@ class ExportAsinDetailBase(object):
asin_price,
asin_rating,
asin_total_comments,
asin_launch_time_type
asin_launch_time_type,
asin_describe
from dwt_flow_asin
where site_name = '{self.site_name}'
and date_type = '{self.date_type}'
...
...
@@ -952,6 +953,8 @@ class ExportAsinDetailBase(object):
select
asin,
review_json_list,
product_json,
product_detail_json,
updated_at
from ods_asin_detail
where site_name = '{self.site_name}'
...
...
@@ -982,12 +985,13 @@ class ExportAsinDetailBase(object):
F
.
col
(
"category_first_id"
)
.
alias
(
"category_id"
),
F
.
col
(
"category_id"
)
.
alias
(
"category_current_id"
),
"parent_asin"
,
F
.
col
(
"first_category_rank"
)
.
alias
(
"bsr_rank"
),
F
.
col
(
"asin_price"
)
.
alias
(
"price"
),
F
.
col
(
"asin_rating"
)
.
alias
(
"rating"
),
F
.
col
(
"asin_total_comments"
)
.
alias
(
"total_comments"
),
"seller_id"
,
"fb_country_name"
,
"review_json_list"
,
F
.
col
(
"asin_launch_time_type"
)
.
alias
(
"launch_time_type"
)
F
.
col
(
"asin_launch_time_type"
)
.
alias
(
"launch_time_type"
),
F
.
col
(
"asin_describe"
)
.
alias
(
"describe"
),
"product_json"
,
"product_detail_json"
)
.
repartition
(
40
,
'asin'
)
def
save_data
(
self
):
con_info
=
DBUtil
.
get_connection_info
(
'postgresql'
,
'us'
)
table_name
=
f
'ai_asin_detail_month_{self.date_info.replace("-", "_")}'
table_name
=
f
'ai_asin_detail_month_{self.date_info.replace("-", "_")}
_copy
'
self
.
df_save
.
write
.
format
(
"jdbc"
)
\
.
option
(
"url"
,
con_info
[
"url"
])
\
.
option
(
"dbtable"
,
table_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