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
3e4fe845
Commit
3e4fe845
authored
Mar 12, 2026
by
chenyuanjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
流量选品-新增ao值、价格等字段同比计算
parent
252e1e6b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
64 additions
and
8 deletions
+64
-8
dwt_flow_asin.py
Pyspark_job/dwt/dwt_flow_asin.py
+0
-0
es_flow_asin.py
Pyspark_job/export_es/es_flow_asin.py
+10
-8
kafka_flow_asin_detail.py
Pyspark_job/my_kafka/kafka_flow_asin_detail.py
+0
-0
kafka_rank_asin_detail.py
Pyspark_job/my_kafka/kafka_rank_asin_detail.py
+0
-0
es_util.py
Pyspark_job/utils/es_util.py
+54
-0
No files found.
Pyspark_job/dwt/dwt_flow_asin.py
View file @
3e4fe845
This diff is collapsed.
Click to expand it.
Pyspark_job/export_es/es_flow_asin.py
View file @
3e4fe845
...
@@ -84,13 +84,13 @@ class EsStDetail(TemplatesMysql):
...
@@ -84,13 +84,13 @@ class EsStDetail(TemplatesMysql):
asin_activity_type as activity_type, act_one_two_val as one_two_val, act_three_four_val as three_four_val,
asin_activity_type as activity_type, act_one_two_val as one_two_val, act_three_four_val as three_four_val,
act_five_six_val as five_six_val, act_eight_val as eight_val, asin_brand_name as brand, variation_num,
act_five_six_val as five_six_val, act_eight_val as eight_val, asin_brand_name as brand, variation_num,
one_star, two_star, three_star, four_star, five_star, low_star, together_asin, account_name, account_id,
one_star, two_star, three_star, four_star, five_star, low_star, together_asin, account_name, account_id,
seller_country_name as site_name, asin_rank_rise as rank_rise, asin_rank_
change
as rank_change,
seller_country_name as site_name, asin_rank_rise as rank_rise, asin_rank_
mom
as rank_change,
asin_ao_rise as ao_rise, asin_ao_
change
as ao_change, asin_price_rise as price_rise,
asin_ao_rise as ao_rise, asin_ao_
mom
as ao_change, asin_price_rise as price_rise,
asin_price_
change as price_change, asin_rating_rise as rating_rise, asin_rating_change
as rating_change,
asin_price_
mom as price_change, asin_rating_rise as rating_rise, asin_rating_mom
as rating_change,
asin_comments_rise as comments_rise, asin_comments_
change
as comments_change,
asin_comments_rise as comments_rise, asin_comments_
mom
as comments_change,
asin_bsr_orders_rise as bsr_orders_rise, asin_bsr_orders_
change
as bsr_orders_change,
asin_bsr_orders_rise as bsr_orders_rise, asin_bsr_orders_
mom
as bsr_orders_change,
asin_sales_rise as sales_rise, asin_sales_
change
as sales_change, asin_variation_rise as variation_rise,
asin_sales_rise as sales_rise, asin_sales_
mom
as sales_change, asin_variation_rise as variation_rise,
asin_variation_
change
as variation_change, asin_size_type as size_type, asin_rating_type as rating_type,
asin_variation_
mom
as variation_change, asin_size_type as size_type, asin_rating_type as rating_type,
asin_site_name_type as site_name_type, asin_weight_type as weight_type, asin_launch_time_type as launch_time_type,
asin_site_name_type as site_name_type, asin_weight_type as weight_type, asin_launch_time_type as launch_time_type,
asin_ao_val_type as ao_val_type, asin_rank_type as rank_type, asin_price_type as price_type, bsr_type,
asin_ao_val_type as ao_val_type, asin_rank_type as rank_type, asin_price_type as price_type, bsr_type,
bsr_best_orders_type, asin_quantity_variation_type as quantity_variation_type, package_quantity, is_movie_label,
bsr_best_orders_type, asin_quantity_variation_type as quantity_variation_type, package_quantity, is_movie_label,
...
@@ -99,7 +99,9 @@ class EsStDetail(TemplatesMysql):
...
@@ -99,7 +99,9 @@ class EsStDetail(TemplatesMysql):
title_matching_degree, asin_lob_info, is_contains_lob_info, is_package_quantity_abnormal, zr_flow_proportion,
title_matching_degree, asin_lob_info, is_contains_lob_info, is_package_quantity_abnormal, zr_flow_proportion,
matrix_flow_proportion, matrix_ao_val, customer_reviews_json as product_features, img_info,
matrix_flow_proportion, matrix_ao_val, customer_reviews_json as product_features, img_info,
coalesce(parent_asin, asin) as collapse_asin, follow_sellers_count, asin_describe, asin_fbm_price as fbm_price,
coalesce(parent_asin, asin) as collapse_asin, follow_sellers_count, asin_describe, asin_fbm_price as fbm_price,
describe_len, asin_bought_mom as bought_month_mom, asin_bought_yoy as bought_month_yoy, tracking_since, tracking_since_type
describe_len, asin_bought_mom as bought_month_mom, asin_bought_yoy as bought_month_yoy, tracking_since, tracking_since_type,
asin_rank_yoy as rank_yoy, asin_ao_yoy as ao_yoy, asin_price_yoy as price_yoy, asin_rating_yoy as rating_yoy,
asin_comments_yoy as comments_yoy, asin_bsr_orders_yoy as bsr_orders_yoy, asin_sales_yoy as sales_yoy, asin_variation_yoy as variation_yoy
from {self.table_name} where site_name='{self.site_name}' and date_type='{self.date_type}' and date_info='{self.date_info}'
from {self.table_name} where site_name='{self.site_name}' and date_type='{self.date_type}' and date_info='{self.date_info}'
"""
"""
print
(
"sql:"
,
sql
)
print
(
"sql:"
,
sql
)
...
...
Pyspark_job/my_kafka/kafka_flow_asin_detail.py
View file @
3e4fe845
This diff is collapsed.
Click to expand it.
Pyspark_job/my_kafka/kafka_rank_asin_detail.py
View file @
3e4fe845
This diff is collapsed.
Click to expand it.
Pyspark_job/utils/es_util.py
View file @
3e4fe845
...
@@ -502,6 +502,30 @@ class EsUtils(object):
...
@@ -502,6 +502,30 @@ class EsUtils(object):
"type"
:
"float"
"type"
:
"float"
}
}
}
}
},
"rank_yoy"
:
{
"type"
:
"float"
},
"ao_yoy"
:
{
"type"
:
"float"
},
"price_yoy"
:
{
"type"
:
"float"
},
"rating_yoy"
:
{
"type"
:
"float"
},
"comments_yoy"
:
{
"type"
:
"float"
},
"bsr_orders_yoy"
:
{
"type"
:
"float"
},
"sales_yoy"
:
{
"type"
:
"float"
},
"variation_yoy"
:
{
"type"
:
"float"
}
}
}
}
}
}
...
@@ -972,6 +996,36 @@ class EsUtils(object):
...
@@ -972,6 +996,36 @@ class EsUtils(object):
"type"
:
"float"
"type"
:
"float"
}
}
}
}
},
"rank_yoy"
:
{
"type"
:
"float"
},
"ao_yoy"
:
{
"type"
:
"float"
},
"price_yoy"
:
{
"type"
:
"float"
},
"rating_yoy"
:
{
"type"
:
"float"
},
"comments_yoy"
:
{
"type"
:
"float"
},
"bsr_orders_yoy"
:
{
"type"
:
"float"
},
"sales_yoy"
:
{
"type"
:
"float"
},
"variation_yoy"
:
{
"type"
:
"float"
},
"bought_month_mom"
:
{
"type"
:
"float"
},
"bought_month_yoy"
:
{
"type"
:
"float"
}
}
}
}
}
}
...
...
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