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
5706eb8c
Commit
5706eb8c
authored
Jul 24, 2026
by
chenyuanjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
信息库指标改为后端关联查询
parent
62de3426
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
96 deletions
+0
-96
dwt_flow_asin_month.py
Pyspark_job/doris_handle/dwt_flow_asin_month.py
+0
-96
No files found.
Pyspark_job/doris_handle/dwt_flow_asin_month.py
View file @
5706eb8c
...
...
@@ -233,20 +233,6 @@ CREATE TABLE IF NOT EXISTS `selection`.`{table_name}`
`title_matching_degree` DECIMAL(20,4) NULL,
`brand_badge_reason` STRING NULL,
`title_stem_15` STRING NULL COMMENT '标题词干前15个词(按空格分词截取)',
`ai_package_quantity` STRING NULL COMMENT 'AI分析-包装数量描述',
`ai_package_quantity_arr` ARRAY<INT> NULL COMMENT 'AI分析-包装数量数组',
`ai_material` STRING NULL COMMENT 'AI分析-材质',
`ai_color` STRING NULL COMMENT 'AI分析-颜色',
`ai_appearance` STRING NULL COMMENT 'AI分析-外观',
`ai_size` STRING NULL COMMENT 'AI分析-尺寸',
`ai_shape` STRING NULL COMMENT 'AI分析-形状',
`ai_function` STRING NULL COMMENT 'AI分析-功能',
`ai_scene_title` STRING NULL COMMENT 'AI分析-使用场景(标题)',
`ai_scene_comment` STRING NULL COMMENT 'AI分析-使用场景(评论)',
`ai_uses` STRING NULL COMMENT 'AI分析-用途',
`ai_theme` STRING NULL COMMENT 'AI分析-主题',
`ai_crowd` STRING NULL COMMENT 'AI分析-目标人群',
`ai_short_desc` STRING NULL COMMENT 'AI分析-简短描述',
`seller_province` STRING NULL COMMENT '卖家所在省份(dim_seller_address关联,仅国内卖家有值)',
`seller_city` STRING NULL COMMENT '卖家所在城市(dim_seller_address关联,仅国内卖家有值)',
INDEX idx_title (`title`) USING INVERTED PROPERTIES("parser" = "english") COMMENT '标题倒排索引',
...
...
@@ -975,20 +961,6 @@ SELECT
f.title_matching_degree,
bb.brand_badge_reason,
ARRAY_JOIN(ARRAY_SLICE(SPLIT_BY_STRING(stem_en(f.title), ' '), 1, 15), ' ') AS title_stem_15,
COALESCE(uma.ai_package_quantity, ai.ai_package_quantity) AS ai_package_quantity,
COALESCE(uma.ai_package_quantity_arr, ai.ai_package_quantity_arr) AS ai_package_quantity_arr,
COALESCE(uma.ai_material, ai.ai_material) AS ai_material,
COALESCE(uma.ai_color, ai.ai_color) AS ai_color,
COALESCE(uma.ai_appearance, ai.ai_appearance) AS ai_appearance,
COALESCE(uma.ai_size, ai.ai_size) AS ai_size,
COALESCE(uma.ai_shape, ai.ai_shape) AS ai_shape,
COALESCE(uma.ai_function, ai.ai_function) AS ai_function,
COALESCE(uma.ai_scene_title, ai.ai_scene_title) AS ai_scene_title,
COALESCE(uma.ai_scene_comment, ai.ai_scene_comment) AS ai_scene_comment,
COALESCE(uma.ai_uses, ai.ai_uses) AS ai_uses,
COALESCE(uma.ai_theme, ai.ai_theme) AS ai_theme,
COALESCE(uma.ai_crowd, ai.ai_crowd) AS ai_crowd,
COALESCE(uma.ai_short_desc, ai.ai_short_desc) AS ai_short_desc,
addr.seller_province,
addr.seller_city
FROM `dwt`.`{site_name}_flow_asin_month` f
...
...
@@ -1039,26 +1011,6 @@ LEFT JOIN (
LEFT JOIN `dwd`.`dwd_asin_auction` aa ON f.asin = aa.asin
LEFT JOIN `dwd`.`dwd_st_brand_badge` bb
ON f.brand = bb.brand AND bb.site_name = '{site_name}' AND bb.date_info = '{date_info}'
-- ===== AI分析数据 =====
LEFT JOIN (
SELECT
asin,
package_quantity AS ai_package_quantity,
package_quantity_arr AS ai_package_quantity_arr,
material AS ai_material,
color AS ai_color,
appearance AS ai_appearance,
size AS ai_size,
shape AS ai_shape,
function AS ai_function,
scene_title AS ai_scene_title,
scene_comment AS ai_scene_comment,
uses AS ai_uses,
theme AS ai_theme,
crowd AS ai_crowd,
short_desc AS ai_short_desc
FROM `selection`.`{site_name}_ai_asin_analyze_detail`
) ai ON f.asin = ai.asin
-- ===== 卖家地址(按 site_name 查对应分区) =====
LEFT JOIN (
SELECT seller_id, fb_country_name, seller_province, seller_city
...
...
@@ -1213,20 +1165,6 @@ CREATE TABLE IF NOT EXISTS `selection`.`{table_name}`
`title_matching_degree` DECIMAL(20,4) NULL,
`brand_badge_reason` STRING NULL,
`title_stem_15` STRING NULL COMMENT '标题词干前15个词(按空格分词截取)',
`ai_package_quantity` STRING NULL COMMENT 'AI分析-包装数量描述',
`ai_package_quantity_arr` ARRAY<INT> NULL COMMENT 'AI分析-包装数量数组',
`ai_material` STRING NULL COMMENT 'AI分析-材质',
`ai_color` STRING NULL COMMENT 'AI分析-颜色',
`ai_appearance` STRING NULL COMMENT 'AI分析-外观',
`ai_size` STRING NULL COMMENT 'AI分析-尺寸',
`ai_shape` STRING NULL COMMENT 'AI分析-形状',
`ai_function` STRING NULL COMMENT 'AI分析-功能',
`ai_scene_title` STRING NULL COMMENT 'AI分析-使用场景(标题)',
`ai_scene_comment` STRING NULL COMMENT 'AI分析-使用场景(评论)',
`ai_uses` STRING NULL COMMENT 'AI分析-用途',
`ai_theme` STRING NULL COMMENT 'AI分析-主题',
`ai_crowd` STRING NULL COMMENT 'AI分析-目标人群',
`ai_short_desc` STRING NULL COMMENT 'AI分析-简短描述',
`seller_province` STRING NULL COMMENT '卖家所在省份(dim_seller_address关联,仅国内卖家有值)',
`seller_city` STRING NULL COMMENT '卖家所在城市(dim_seller_address关联,仅国内卖家有值)',
`latest_date_info` STRING NULL COMMENT '最新出现月份(yyyy-MM)',
...
...
@@ -1398,20 +1336,6 @@ SELECT
f.title_matching_degree,
bb.brand_badge_reason,
ARRAY_JOIN(ARRAY_SLICE(SPLIT_BY_STRING(stem_en(f.title), ' '), 1, 15), ' ') AS title_stem_15,
COALESCE(uma.ai_package_quantity, ai.ai_package_quantity) AS ai_package_quantity,
COALESCE(uma.ai_package_quantity_arr, ai.ai_package_quantity_arr) AS ai_package_quantity_arr,
COALESCE(uma.ai_material, ai.ai_material) AS ai_material,
COALESCE(uma.ai_color, ai.ai_color) AS ai_color,
COALESCE(uma.ai_appearance, ai.ai_appearance) AS ai_appearance,
COALESCE(uma.ai_size, ai.ai_size) AS ai_size,
COALESCE(uma.ai_shape, ai.ai_shape) AS ai_shape,
COALESCE(uma.ai_function, ai.ai_function) AS ai_function,
COALESCE(uma.ai_scene_title, ai.ai_scene_title) AS ai_scene_title,
COALESCE(uma.ai_scene_comment, ai.ai_scene_comment) AS ai_scene_comment,
COALESCE(uma.ai_uses, ai.ai_uses) AS ai_uses,
COALESCE(uma.ai_theme, ai.ai_theme) AS ai_theme,
COALESCE(uma.ai_crowd, ai.ai_crowd) AS ai_crowd,
COALESCE(uma.ai_short_desc, ai.ai_short_desc) AS ai_short_desc,
addr.seller_province,
addr.seller_city,
-- ===== 年度聚合(dwt/dwt_flow_asin_year.py 在 Hive 预计算,经 sync_extra_table 同步到 Doris)=====
...
...
@@ -1487,26 +1411,6 @@ LEFT JOIN (
WHERE site_name = '{site_name}'
AND date_info = (SELECT MAX(date_info) FROM `dwd`.`dwd_st_brand_badge` WHERE site_name = '{site_name}')
) bb ON f.brand = bb.brand
-- ===== AI分析数据 =====
LEFT JOIN (
SELECT
asin,
package_quantity AS ai_package_quantity,
package_quantity_arr AS ai_package_quantity_arr,
material AS ai_material,
color AS ai_color,
appearance AS ai_appearance,
size AS ai_size,
shape AS ai_shape,
function AS ai_function,
scene_title AS ai_scene_title,
scene_comment AS ai_scene_comment,
uses AS ai_uses,
theme AS ai_theme,
crowd AS ai_crowd,
short_desc AS ai_short_desc
FROM `selection`.`{site_name}_ai_asin_analyze_detail`
) ai ON f.asin = ai.asin
-- ===== 卖家地址(按 site_name 查对应分区) =====
LEFT JOIN (
SELECT seller_id, fb_country_name, seller_province, seller_city
...
...
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