Commit 72393bc8 by chenyuanjie

fix

parent e97a3b65
...@@ -120,9 +120,9 @@ class EsStDetail(TemplatesMysql): ...@@ -120,9 +120,9 @@ class EsStDetail(TemplatesMysql):
self.df_synchronize = self.df_synchronize.join( self.df_synchronize = self.df_synchronize.join(
self.df_profit_rate, on=['asin', 'price'], how='left' self.df_profit_rate, on=['asin', 'price'], how='left'
).withColumn( ).withColumn(
"img_type", F.split(F.col("img_type"), ",") "img_type_arr", F.split(F.col("img_type"), ",")
).withColumn( ).withColumn(
"img_type", F.expr("transform(img_type, x -> cast(x as int))") "img_type_arr", F.expr("transform(img_type_arr, x -> cast(x as int))")
).withColumn( ).withColumn(
'profit_key', F.concat_ws("_", F.col("asin"), F.col("price")) 'profit_key', F.concat_ws("_", F.col("asin"), F.col("price"))
).cache() ).cache()
......
...@@ -228,7 +228,7 @@ class EsUtils(object): ...@@ -228,7 +228,7 @@ class EsUtils(object):
"type": "short" "type": "short"
}, },
"img_type": { "img_type": {
"type": "integer" "type": "keyword"
}, },
"activity_type": { "activity_type": {
"type": "keyword" "type": "keyword"
...@@ -486,6 +486,9 @@ class EsUtils(object): ...@@ -486,6 +486,9 @@ class EsUtils(object):
"tracking_since_type": { "tracking_since_type": {
"type": "short" "type": "short"
}, },
"img_type_arr": {
"type": "integer"
},
"profit_key": { "profit_key": {
"type": "keyword" "type": "keyword"
}, },
......
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