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
50ef6300
Commit
50ef6300
authored
Oct 21, 2026
by
chenyuanjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
竞卖、sku数据源调整
parent
8fa57120
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
13 deletions
+7
-13
dwt_flow_asin.py
Pyspark_job/dwt/dwt_flow_asin.py
+4
-7
kafka_flow_asin_detail_to_doris.py
Pyspark_job/my_kafka/kafka_flow_asin_detail_to_doris.py
+3
-6
No files found.
Pyspark_job/dwt/dwt_flow_asin.py
View file @
50ef6300
...
...
@@ -8,7 +8,7 @@
dim_asin_bs_category
dim_fb_asin_info
dim_asin_volume
product_audit_asin_sku
(mysql)
asin_auction_sku_stat
(mysql)
@SinkTable : dwt_flow_asin
...
...
@@ -313,15 +313,12 @@ class DwtFlowAsin(Templates):
self
.
color_set
=
{
row
.
en_name
for
row
in
color_rows
}
print
(
f
"颜色词表共 {len(self.color_set)} 条"
)
print
(
"12.获取
product_audit_asin_sku
,得到asin竞卖数、sku创建数"
)
print
(
"12.获取
asin_auction_sku_stat
,得到asin竞卖数、sku创建数"
)
mysql_con
=
DBUtil
.
get_connection_info
(
"mysql"
,
"us"
)
sql
=
"""
select asin,
count(asin) as auctions_num,
count((case when sku != '' then sku end)) as skus_num_creat
from product_audit_asin_sku
select asin, auctions_num, skus_num_creat
from asin_auction_sku_stat
WHERE asin REGEXP '^[0-9A-Z]{10}$'
group by asin
"""
print
(
"sql:"
+
sql
)
self
.
df_asin_auction
=
SparkUtil
.
read_jdbc_query
(
session
=
self
.
spark
,
url
=
mysql_con
[
'url'
],
pwd
=
mysql_con
[
'pwd'
],
...
...
Pyspark_job/my_kafka/kafka_flow_asin_detail_to_doris.py
View file @
50ef6300
...
...
@@ -1027,14 +1027,11 @@ class KafkaFlowAsinDetail(Templates):
username
=
mysql_con
[
'username'
],
query
=
sql
)
.
persist
(
StorageLevel
.
MEMORY_ONLY
))
self
.
df_ai_hide_category
.
show
(
10
,
truncate
=
False
)
print
(
"12. 读取
product_audit_asin_sku
,得到asin竞卖数、sku创建数"
)
print
(
"12. 读取
asin_auction_sku_stat
,得到asin竞卖数、sku创建数"
)
sql
=
"""
select asin,
count(asin) as auctions_num,
count((case when sku != '' then sku end)) as skus_num_creat
from product_audit_asin_sku
select asin, auctions_num, skus_num_creat
from asin_auction_sku_stat
WHERE asin REGEXP '^[0-9A-Z]{10}$'
group by asin
"""
self
.
df_asin_auction
=
SparkUtil
.
read_jdbc_query
(
session
=
self
.
spark
,
url
=
mysql_con
[
'url'
],
pwd
=
mysql_con
[
'pwd'
],
...
...
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