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
6e8e0923
Commit
6e8e0923
authored
Oct 09, 2026
by
chenyuanjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
流量选品30天-account_name修复
parent
75c5c3ae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
kafka_flow_asin_detail_to_doris.py
Pyspark_job/my_kafka/kafka_flow_asin_detail_to_doris.py
+3
-3
No files found.
Pyspark_job/my_kafka/kafka_flow_asin_detail_to_doris.py
View file @
6e8e0923
...
...
@@ -304,11 +304,11 @@ class KafkaFlowAsinDetail(Templates):
# 1. 关联全局缓存的df_asin_seller,用于填充seller_id为空的情况
df
=
df
.
join
(
self
.
df_asin_seller
,
on
=
[
'asin'
],
how
=
'left'
)
# 2. 优先使用kafka消息
中的seller_id,为空则使用df_asin_seller的
数据
# 2. 优先使用kafka消息
数据,seller_id为空时seller_id和account_name整体取df_asin_seller
数据
df
=
df
.
withColumn
(
"
seller_id"
,
F
.
coalesce
(
F
.
col
(
"seller_id"
),
F
.
col
(
"fd_seller_id
"
))
"
account_name"
,
F
.
when
(
F
.
col
(
"seller_id"
)
.
isNull
(),
F
.
col
(
"fd_account_name"
))
.
otherwise
(
F
.
col
(
"account_name
"
))
)
.
withColumn
(
"
account_name"
,
F
.
coalesce
(
F
.
col
(
"account_name"
),
F
.
col
(
"fd_account_name
"
))
"
seller_id"
,
F
.
when
(
F
.
col
(
"seller_id"
)
.
isNull
(),
F
.
col
(
"fd_seller_id"
))
.
otherwise
(
F
.
col
(
"seller_id
"
))
)
.
drop
(
"fd_seller_id"
,
"fd_account_name"
)
# 3. 关联全局缓存的df_seller_country获取seller_country_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