Commit 9c30eac2 by chenyuanjie

asin_latest_detail新增asin属性列表字段+node_id

parent ba7b4a2e
...@@ -935,7 +935,11 @@ class DwtFlowAsin(Templates): ...@@ -935,7 +935,11 @@ class DwtFlowAsin(Templates):
F.col("describe_len").alias("asin_describe_len"), F.col("describe_len").alias("asin_describe_len"),
"asin_type", "asin_type",
F.lit(None).cast("int").alias("is_amazon_new"), F.lit(None).cast("int").alias("is_amazon_new"),
"auctions_num", "auctions_num_all", "skus_num_creat", "skus_num_creat_all" "auctions_num", "auctions_num_all", "skus_num_creat", "skus_num_creat_all",
F.col("asin_age_range").alias("age_range"), F.col("asin_seasons").alias("seasons"),
F.col("asin_additional_features").alias("additional_features"),
F.col("asin_closure_type").alias("closure_type"), F.col("asin_shape").alias("shape"),
F.col("asin_theme").alias("theme"), F.col("asin_pattern").alias("pattern"), "node_id"
) )
table_columns = """asin, asin_ao_val, asin_title, asin_title_len, asin_category_desc, asin_volume, table_columns = """asin, asin_ao_val, asin_title, asin_title_len, asin_category_desc, asin_volume,
asin_weight, asin_weight_str, asin_launch_time, asin_brand_name, asin_weight, asin_weight_str, asin_launch_time, asin_brand_name,
...@@ -951,7 +955,8 @@ class DwtFlowAsin(Templates): ...@@ -951,7 +955,8 @@ class DwtFlowAsin(Templates):
seller_json, buy_box_seller_type, seller_json, buy_box_seller_type,
asin_describe, asin_fbm_price, asin_describe_len, asin_describe, asin_fbm_price, asin_describe_len,
asin_type, is_amazon_new, asin_type, is_amazon_new,
auctions_num, auctions_num_all, skus_num_creat, skus_num_creat_all""" auctions_num, auctions_num_all, skus_num_creat, skus_num_creat_all,
age_range, seasons, additional_features, closure_type, shape, theme, pattern, node_id"""
DorisHelper.spark_export_with_columns(df_save=df_doris, db_name=self.doris_db, table_name=self.asin_latest_detail_table, table_columns=table_columns) DorisHelper.spark_export_with_columns(df_save=df_doris, db_name=self.doris_db, table_name=self.asin_latest_detail_table, table_columns=table_columns)
print("save asin_latest_detail success") print("save asin_latest_detail success")
print("往doris存储父ASIN最新变体信息:") print("往doris存储父ASIN最新变体信息:")
......
...@@ -1220,6 +1220,7 @@ class KafkaFlowAsinDetail(Templates): ...@@ -1220,6 +1220,7 @@ class KafkaFlowAsinDetail(Templates):
"asin_type", "asin_type",
"is_amazon_new", "is_amazon_new",
"auctions_num", "auctions_num_all", "skus_num_creat", "skus_num_creat_all", "auctions_num", "auctions_num_all", "skus_num_creat", "skus_num_creat_all",
"age_range", "seasons", "additional_features", "closure_type", "shape", "theme", "pattern", "node_id",
) )
table_columns = """asin, asin_ao_val, asin_title, asin_title_len, asin_category_desc, asin_volume, table_columns = """asin, asin_ao_val, asin_title, asin_title_len, asin_category_desc, asin_volume,
asin_weight, asin_launch_time, asin_brand_name, one_star, two_star, three_star, four_star, five_star, low_star, asin_weight, asin_launch_time, asin_brand_name, one_star, two_star, three_star, four_star, five_star, low_star,
...@@ -1228,7 +1229,8 @@ class KafkaFlowAsinDetail(Templates): ...@@ -1228,7 +1229,8 @@ class KafkaFlowAsinDetail(Templates):
date_info, img_url, category_current_id, category_first_rank, category_current_rank, bsr_orders, bsr_orders_sale, date_info, img_url, category_current_id, category_first_rank, category_current_rank, bsr_orders, bsr_orders_sale,
page_inventory, asin_bought_month, seller_json, buy_box_seller_type, asin_describe, asin_fbm_price, asin_describe_len, page_inventory, asin_bought_month, seller_json, buy_box_seller_type, asin_describe, asin_fbm_price, asin_describe_len,
asin_weight_str, best_sellers_rank, best_sellers_herf, asin_type, is_amazon_new, asin_weight_str, best_sellers_rank, best_sellers_herf, asin_type, is_amazon_new,
auctions_num, auctions_num_all, skus_num_creat, skus_num_creat_all""" auctions_num, auctions_num_all, skus_num_creat, skus_num_creat_all,
age_range, seasons, additional_features, closure_type, shape, theme, pattern, node_id"""
DorisHelper.spark_export_with_columns( DorisHelper.spark_export_with_columns(
df_save=df_asin_latest_detail, db_name=self.doris_db_selection, df_save=df_asin_latest_detail, db_name=self.doris_db_selection,
table_name=self.asin_latest_detail_table, table_columns=table_columns table_name=self.asin_latest_detail_table, table_columns=table_columns
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment