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
5f5be0b7
Commit
5f5be0b7
authored
Aug 12, 2025
by
chenyuanjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
d9094553
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
common_udf.py
Pyspark_job/yswg_utils/common_udf.py
+4
-4
No files found.
Pyspark_job/yswg_utils/common_udf.py
View file @
5f5be0b7
...
...
@@ -802,10 +802,10 @@ def udf_parse_seller_json(seller_json):
return
0
,
None
,
None
else
:
seller_info_parsed
=
json
.
loads
(
seller_json
)
ship_from
=
seller_info_parsed
[
"ship_from"
]
|
None
sold_by
=
seller_info_parsed
[
"sold_by"
]
|
None
fulfilled_by
=
seller_info_parsed
[
"fulfilled_by"
]
|
None
seller_id
=
seller_info_parsed
[
"seller_id"
]
|
None
ship_from
=
seller_info_parsed
.
get
(
"ship_from"
,
None
)
sold_by
=
seller_info_parsed
.
get
(
"sold_by"
,
None
)
fulfilled_by
=
seller_info_parsed
.
get
(
"fulfilled_by"
,
None
)
seller_id
=
seller_info_parsed
.
get
(
"seller_id"
,
None
)
if
(
ship_from
and
ship_from
.
lower
()
.
strip
()
.
startswith
(
"amazon"
))
or
(
fulfilled_by
and
'amazon'
in
fulfilled_by
.
lower
()):
if
sold_by
and
not
sold_by
.
lower
()
.
strip
()
.
startswith
(
"amazon"
):
...
...
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