Commit 0f3fa922 by chenyuanjie

fix

parent c3f34ac5
......@@ -190,7 +190,9 @@ class ExportNeedProfitRate(object):
df_result = df_need \
.join(df_cate, on='category_first_id', how='left') \
.withColumn('source_month', F.date_format(F.col('asin_crawl_date'), 'yyyy-MM')) \
.withColumn('asin_crawl_date', F.coalesce(F.col('asin_crawl_date'), F.current_timestamp())) \
.withColumn('source_month', F.coalesce(F.date_format(F.col('asin_crawl_date'), 'yyyy-MM'),
F.date_format(F.current_timestamp(), 'yyyy-MM'))) \
.withColumn('part_key', F.ntile(50).over(Window.orderBy(F.rand()))) \
.select(
'asin', 'price', 'category',
......
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